Prevent OnPlayerRequestSpawn repeating? - 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)
+--- Thread: Prevent OnPlayerRequestSpawn repeating? (
/showthread.php?tid=361642)
Prevent OnPlayerRequestSpawn repeating? -
DarrenReeder - 21.07.2012
Hello, At the moment I have this for my onplayerrequest spawn calback:
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(PlayerNotLoggedIntoAcc[playerid] == true){
SendClientMessage(playerid, COLOR_RED, "Please /login first");
return 0;
}
return 1;
}
When i press Shift in my script to spawn, it repeats the SendClientMessage about 4 times a second. Is there an easy fix to this? If not ill just make a varaible and timer.
Re: Prevent OnPlayerRequestSpawn repeating? -
namespace - 21.07.2012
there is nothing wrong with it..
all servers have that
Re: Prevent OnPlayerRequestSpawn repeating? -
DarrenReeder - 21.07.2012
I know, it just looks messy.I know how can i prevent it pretty easily with variables and timers, but was wodnering if there was a way you can just make it call that callback when the key is released instead of when its down.