I was using the cheat activate system like Aero's cp.
May I ask how to make the cheat could only be activated once by the same player?
I notice if someone activate it twice, all things will be double up.
such as -gold 500 will become $1000.
lol
Cheat could only be activated once?
Moderator: Cheaters
-
- Some Honorary Title
- Posts: 1713
- Joined: June 8th, 2007, 5:08 am
- Title: Angry Bird
Re: Cheat could only be activated once?
its not only in aero's cp..i had the same with weirdone2's pack
i used the gold 50 and got 100
i used the gold 50 and got 100
-
- Forum Staff
- Posts: 926
- Joined: June 3rd, 2007, 8:03 pm
-
- The Flying Cow!
- Posts: 2196
- Joined: November 2nd, 2007, 10:34 pm
- Location: Melbourne
Re: Cheat could only be activated once?
I think you'd need to make it only register "-" chat event if the a variable "activated" (boolean) is false....
SO something like this
Instead of this:
make a new global named 'acti' as a boolean array
and change the code to this
That's how I think it works anyway...
And I think it doubles up cos when u type it in twice, it registers the same event twice...
SO something like this
Instead of this:
Code: Select all
if SubString(GetEventPlayerChatString(),0,23)=="-Pronstar"then
set zzdz[i+48]=zzdz[i+48]+1
call TriggerRegisterPlayerChatEvent(zwWW,p,"-",false)
endif
and change the code to this
Code: Select all
if SubString(GetEventPlayerChatString(),0,23)=="-Pronstar"then
if(acti[GetPlayerId(GetTriggerPlayer())]==false)then
set zzdz[i+48]=zzdz[i+48]+1
call TriggerRegisterPlayerChatEvent(zwWW,p,"-",false)
endif
endif
And I think it doubles up cos when u type it in twice, it registers the same event twice...
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
AutoCP3 now available for free!
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: Cheat could only be activated once?
Or we can all not be noobs so I don't have to sacrifice more code space and efficiency . . . ^.^'
-
- The Flying Cow!
- Posts: 2196
- Joined: November 2nd, 2007, 10:34 pm
- Location: Melbourne
Re: Cheat could only be activated once?
3 more lines doesn't really matter... -.-
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
AutoCP3 now available for free!
-
- Some Honorary Title
- Posts: 1713
- Joined: June 8th, 2007, 5:08 am
- Title: Angry Bird
Re: Cheat could only be activated once?
The way you mentioned would be the easiet way though.
I was thinking not to have any additional globals. If that's gonna to work, it will not only add 3 more lines. It will need at least one additional function though.
That's the problem, one time a noob on our team keep typing the password over and over again because he thought he needs to type the pasword everytime before he typed other commands.
Guess what happend? He DC'ed . It stacked up much for him.
lol.
wait, it's not working, any help please?
I was thinking not to have any additional globals. If that's gonna to work, it will not only add 3 more lines. It will need at least one additional function though.
lol.Aero wrote:Or we can all not be noobs so I don't have to sacrifice more code space and efficiency . . . ^.^'
That's the problem, one time a noob on our team keep typing the password over and over again because he thought he needs to type the pasword everytime before he typed other commands.
Guess what happend? He DC'ed . It stacked up much for him.
lol.
wait, it's not working, any help please?
-
- The Flying Cow!
- Posts: 2196
- Joined: November 2nd, 2007, 10:34 pm
- Location: Melbourne
Re: Cheat could only be activated once?
How will it need an additional function..?
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
AutoCP3 now available for free!
-
- Some Honorary Title
- Posts: 1713
- Joined: June 8th, 2007, 5:08 am
- Title: Angry Bird
Re: Cheat could only be activated once?
Tested it, it didn't work.
when I talked about adding one more function I was tlaking about something else, about and -off cheat command which will also remove all existing functions.
hmm,
I actually know how to do it, but that will surely making the com to run an unecessary function to detect if the player has already activated the cheats.
hmm.
Got to be someway simplier and less laggy.
edit: I got it, thx. I just used a globals integer
when I talked about adding one more function I was tlaking about something else, about and -off cheat command which will also remove all existing functions.
hmm,
I actually know how to do it, but that will surely making the com to run an unecessary function to detect if the player has already activated the cheats.
hmm.
Got to be someway simplier and less laggy.
edit: I got it, thx. I just used a globals integer
-
- Forum Staff
- Posts: 926
- Joined: June 3rd, 2007, 8:03 pm
Re: Cheat could only be activated once?
If your using my pack you could make it only activate once with this if statement. I won't add this to my pack however since imo it's your fault if you activate more then once and I persoanlly sometimes purposefully make my cmds go 2x-8x.

Code: Select all
if SubString(GetEventPlayerChatString(),0,23)=="-Pronstar"then
if zzdz[i+48]<1then
set zzdz[i+48]=zzdz[i+48]+1
call TriggerRegisterPlayerChatEvent(zwWW,p,"-",false)
endif
endif
endif