[GM]Help
#1

I creating my first gamemode .. it has 1200 lines of code now,easy to make.
I now creating AntiCheat in my gamemode.
I created weapon anticheat with..

define BanPlayer(playerid); like

SendClientMessage(playerid,0xblabla,"You banned from this server!");
Ban(playerid);

Код:
new weapon=GetPlayerWeapon(playerid);
if(weapon == weaponid){BanPlayer(playerid);}
and it works....
but now i wanna create vehicle anticheat (hydra,hunter and rhino).. i try

Код:
new vehicle=GetPlayerVehicleID(playerid);
if(vehicle==vehicleid){BanPlayer(playerid);}
( i put that in onplayerupdate) but it not works... how to fix that?
Reply
#2

pawn Код:
new vehicle=GetVehicleModel(vehicleid);
if(vehicle==425){BanPlayer(playerid);} //425 is a Hydra
Model, not ID.

Go here for all model numbers:
https://sampwiki.blast.hk/wiki/Category:Vehicle
Reply
#3

ok,working fine
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)