minigun
#1

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
Reply
#2

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.
Reply
#3


public OnPlayerUpdate(playerid)
if(GetPlayerWeapon(playerid) == 3Kick(playerid);
else IsPlayerAdmin(playerid); what do i type here like : Dont Kick(playerid)
Reply
#4

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).
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: