whats better? - 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: whats better? (
/showthread.php?tid=189644)
whats better? -
dark_clown - 12.11.2010
whats better making a weapon anti cheat
on OnPlayerUpdate
or making a specific timer for it like for 1 sec?
Re: whats better? -
Retardedwolf - 12.11.2010
Timer on 1 second.
Re: whats better? -
The_Moddler - 12.11.2010
Well, if you are planning to show messages when the player get's banned, use a one second timer, else if you are going to just ban the player, you can use OnPlayerUpdate like this:
pawn Код:
public OnPlayerUpdate(playerid)
{
if(GetPlayerWeapon(playerid) == 38) Ban(playerid); //Weapon minigun
return 1;
}
Re: whats better? -
dark_clown - 12.11.2010
Quote:
Originally Posted by The_Moddler
Well, if you are planning to show messages when the player get's banned, use a one second timer, else if you are going to just ban the player, you can use OnPlayerUpdate like this:
pawn Код:
public OnPlayerUpdate(playerid) { if(GetPlayerWeapon(playerid) == 38) Ban(playerid); //Weapon minigun return 1; }
|
i know iv made it
Re: whats better? -
Retardedwolf - 12.11.2010
Well you could just use GetPlayerWeaponData which isn't really that accurate but it can detect weapons without players having it equipped.