Help with weapon autokick message - 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: Help with weapon autokick message (
/showthread.php?tid=201200)
Help with weapon autokick message -
linuxthefish - 20.12.2010
I am currently running a filterscript that stops players using NV or IR goggles. This script works, but i would like to add a message saying "Playername has been kicked for messing with goggles" when i try do do this with
Код:
new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
GetPlayerName(i, pname, sizeof(pname));
format(string, sizeof(string), "%s has been kicked for messing with goggles.", pname);
SendClientMessageToAll(0xFFFF00AA, string);
Then i get this message every second whever i am wearing goggles or not!
The filterscript i am using can be found
here
Please can someone tell me what is wrong, or what i need to do to make it send only 1 message when the player gets kicked?
Thanks
Re: Help with weapon autokick message -
admantis - 20.12.2010
your triggering CheckWeapon2 as soon the filterscript starts which will show the message as soon filterscript starts..
copy the functions from CheckWeapon2 to CheckWeapon (above Kick(i)), make the timer 1000ms and not 1ms to avoid ultra uber lag and delete the timer CheckWeapon2 and it's callback.
Re: Help with weapon autokick message -
linuxthefish - 20.12.2010
It works now, thanks for your help