Command Spammed Server
#1

Hi I build this code!
http://pastebin.com/tXXxPjRQ

Its to turn off speedboost n shit! When I turn it off it's spamming the server with:

You have your stunt and horn disabled, please use /shon
You have your stunt and horn disabled, please use /shon
You have your stunt and horn disabled, please use /shon
.................................................. ..........................

PS: It does not turn them off someone fix my code. It would be greatly appriciated!
Thanks
ExpertProgrammer
Reply
#2

Your OnPlayerKeyStateChange code looks a bit messy. Dont use all those checks for shoff, one is enough.
Do it like this, it should work then:

pawn Код:
if(shoff == 1)
{
    if(key1 pressed){...}
    if(key2 pressed){...}
    ....
    if(keyN pressed){...}
} else if(shoff == 2) {
    SendClientMessage(playerid, 0x000087FF, "You have your stunt and horn disabled, please use /shon");
}
Reply
#3

Thanks I will try it!
Reply
#4

Better.
No More Command Abuse - Tutorial
Reply
#5

Fixed it guys... Thanks for your help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)