minigun - 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: minigun (
/showthread.php?tid=140572)
minigun -
gozo12 - 09.04.2010
hi there .. how to script etc : if player is admin and he spawn a minigun .nothing get happend but when a normal player have a minigun
he get automaticly kick
sorry fo ma bad english
have good day
Re: minigun -
Correlli - 09.04.2010
Use
GetPlayerWeapon function at
OnPlayerUpdate callback to check if player has a forbidden weapon in his hands, or just use
GetPlayerWeaponData function to check for every weapon that player has in his slot and finally, use the
Kick function to kick him from the server.
Use
IsPlayerAdmin function to check if player is/isn't admin.
Re: minigun -
gozo12 - 09.04.2010
public OnPlayerUpdate(playerid)
if(GetPlayerWeapon(playerid) == 3
Kick(playerid);
else IsPlayerAdmin(playerid); what do i type here like : Dont Kick(playerid)
Re: minigun -
RSX - 09.04.2010
Quote:
Originally Posted by Don Correlli
Use GetPlayerWeapon function at OnPlayerUpdate callback to check if player has a forbidden weapon in his hands, or just use GetPlayerWeaponData function to check for every weapon that player has in his slot and finally, use the Kick function to kick him from the server.
Use IsPlayerAdmin function to check if player is/isn't admin.
|
Sounds useful for me too, but i'm bothered about OnPlayerUpdate timing.. i mean, so often, there is another method to do this by simple check (I'll not say it, as it is for a popular server).
Re: minigun -
Correlli - 09.04.2010
Quote:
Originally Posted by RSX
Sounds useful for me too, but i'm bothered about OnPlayerUpdate timing.. i mean, so often, there is another method to do this by simple check (I'll not say it, as it is for a popular server).
|
That's why that callback is so good. It won't lag your server if you know what to use in that callback.