SA-MP Forums Archive
Command Spammed Server - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Command Spammed Server (/showthread.php?tid=176858)



Command Spammed Server - Guest3598475934857938411 - 15.09.2010

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


Re: Command Spammed Server - Mauzen - 15.09.2010

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");
}



Re: Command Spammed Server - Guest3598475934857938411 - 15.09.2010

Thanks I will try it!


Re: Command Spammed Server - willsuckformoney - 15.09.2010

Better.
No More Command Abuse - Tutorial


Re: Command Spammed Server - Guest3598475934857938411 - 18.09.2010

Fixed it guys... Thanks for your help