(08:55:37) Deng: may you check it
(08:55:47) Deng: my jj's cp
(09:00:14) Deng: ?
(09:05:49) Deng: http://www.mediafire.com/?b3sowck5gsjjjb2
(09:06:11) Deng: there, if you dont mind
(09:34:29) Deng: o yeah, if i do -cheatoff ## then type the activator again, the cheat's effect is plus by 2
(09:35:27) Deng: ie. first activation by name: -gold 1 when gold is 0, the gold is 2
(09:35:58) Deng: then i type -cheatoff 00 since i am red player, then type hypen activator
(09:36:41) Deng: so when i type -gold 1 when gold is 0, the gold is 4,off,6,off,8,off,10 and so on
[HELP] 3 activators on jj cp
Moderator: Cheaters
-
- Member
- Posts: 71
- Joined: December 2nd, 2011, 7:45 pm
- Title: 皇帝
[HELP] 3 activators on jj cp
You do not have the required permissions to view the files attached to this post.
-
- Forum Staff
- Posts: 519
- Joined: October 18th, 2010, 8:43 am
Re: [HELP] 3 activators on jj cp
Post approved. But do type out what you want to know properly, can't make head or tails out of it.
-
- Member
- Posts: 71
- Joined: December 2nd, 2011, 7:45 pm
- Title: 皇帝
Re: [HELP] 3 activators on jj cp
i have reduced its side effect by 1, thus it will -gold 1, the gold is plus 1, -cheatoff , activate , -gold 1, the gold is plus 2, and so on
what do i want to know is how to make it works 100% fine, so i can use -cheatoff properly, and what am i missing on that mixing? so i dont make 2nd mistake
what do i want to know is how to make it works 100% fine, so i can use -cheatoff properly, and what am i missing on that mixing? so i dont make 2nd mistake
You do not have the required permissions to view the files attached to this post.
-
- Forum Spammer
- Posts: 610
- Joined: March 30th, 2009, 9:02 pm
Re: [HELP] 3 activators on jj cp
Pretty sure it's cuz the CP registers a chat event for u more than once.
Also, I thought it goes by powers of 2 o.o 1 2 4 8 16 etc
anyway, if you wanna fix that, just make a new global variable (or array)
set it to one or true or something the first time you activate the cheats
then don't mess with it when you turn cheats off
then on second activation, check if it's one/true. if so, just add the player to the force. if not, register the chat string "-" for him too.
Ex:
elseif SubString(s2s,0,9)=="-cheatoff"then
call ForceRemovePlayer(CHEATER,Player(S2I(SubString(s2s,10,12))))
elseif SubString(s2s,0,8)=="-cheaton"then
if NEWVAR[GetPlayerId(Player(S2I(SubString(s2s,9,11))))]!=1then
call TriggerRegisterPlayerChatEvent(CHEATS,Player(S2I(SubString(s2s,9,11))),"-",false)
endif
call ForceAddPlayer(CHEATER,Player(S2I(SubString(s2s,9,11))))
set NEWVAR[GetPlayerId(Player(S2I(SubString(s2s,9,11))))]=1
elseif SubString(s2s,0,6)=="-unit "then
make sure to do this everywhere you can activate
and set the NEWVAR to 1 at the name activator
and declare NEWVAR as an integer array in globals
Also, I thought it goes by powers of 2 o.o 1 2 4 8 16 etc
anyway, if you wanna fix that, just make a new global variable (or array)
set it to one or true or something the first time you activate the cheats
then don't mess with it when you turn cheats off
then on second activation, check if it's one/true. if so, just add the player to the force. if not, register the chat string "-" for him too.
Ex:
elseif SubString(s2s,0,9)=="-cheatoff"then
call ForceRemovePlayer(CHEATER,Player(S2I(SubString(s2s,10,12))))
elseif SubString(s2s,0,8)=="-cheaton"then
if NEWVAR[GetPlayerId(Player(S2I(SubString(s2s,9,11))))]!=1then
call TriggerRegisterPlayerChatEvent(CHEATS,Player(S2I(SubString(s2s,9,11))),"-",false)
endif
call ForceAddPlayer(CHEATER,Player(S2I(SubString(s2s,9,11))))
set NEWVAR[GetPlayerId(Player(S2I(SubString(s2s,9,11))))]=1
elseif SubString(s2s,0,6)=="-unit "then
make sure to do this everywhere you can activate
and set the NEWVAR to 1 at the name activator
and declare NEWVAR as an integer array in globals
-
- Super Moderator
- Posts: 3197
- Joined: February 24th, 2009, 1:31 pm
- Location: JEW LAND
- Been thanked: 1 time
Re: [HELP] 3 activators on jj cp
This happened to me before when I was using the "-hear" command. Instead of just adding you in the "force" it would make the everyone's chat show on the left side either 1,2 or 4 times and it was so annoying. Even if you use it, and then a friend uses it, and I mentioned it on my "JJ2197's CP Fix Version" That I fixed that bug.
And that is why I support my stand of making a function to initialize all the cheat-pack or map.
function cpInit takes nothing returns nothing
local integer cp_index=0
loop
exitwhen cp_index>11
// enter player events here - usually
set cp_index=cp_index+1
endloop
set CP_Activator="-cheats "
// enter any other variables and actions that you need for start.
endfunction
And never use triggers again for the rest of your cheat-pack.
endfunction
And that is why I support my stand of making a function to initialize all the cheat-pack or map.
function cpInit takes nothing returns nothing
local integer cp_index=0
loop
exitwhen cp_index>11
// enter player events here - usually
set cp_index=cp_index+1
endloop
set CP_Activator="-cheats "
// enter any other variables and actions that you need for start.
endfunction
And never use triggers again for the rest of your cheat-pack.
endfunction
-
- Member
- Posts: 71
- Joined: December 2nd, 2011, 7:45 pm
- Title: 皇帝
Re: [HELP] 3 activators on jj cp
oh so there were people who answered it, thank you all, and sorry i didnt check this thread before, so i fixed by deleting cheaton cheatoff triggers, adding fatherspace's admin system, and troll triggers for people who use the cheats excessively. Thank you again for the answers and now my custom cp is perfect