SA-MP Forums Archive
[GM]Help - 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: [GM]Help (/showthread.php?tid=71463)



[GM]Help - Luka P. - 01.04.2009

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?


Re: [GM]Help - Pyrokid - 01.04.2009

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


Re: [GM]Help - Luka P. - 01.04.2009

ok,working fine