[HELP] anti steal vehicle - 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)
+--- Thread: [HELP] anti steal vehicle (
/showthread.php?tid=558053)
[HELP] anti steal vehicle -
Luca12 - 16.01.2015
Hello is there a way to make a code that will do if someone player try to steal car from another player then it says to player who try to steal car send a some message to him like you can's steal other people vehicle if you know what I mean? Thanks
Re: [HELP] anti steal vehicle -
X|Dragon|X - 16.01.2015
https://sampforum.blast.hk/showthread.php?tid=278082
There is a search bro.
Re: [HELP] anti steal vehicle -
Abagail - 16.01.2015
You can use the OnPlayerEnterVehicle / StateChange callback.
Example:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(!ispassenger && DoesVehicleHaveDriver(vehicleid))
{
g_iDriver[vehicleid] = GetVehicleDriver(vehicleid);
RemovePlayerFromVehicle(playerid);
ClearAnimations(playerid);
new Float: pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
PutPlayerInVehicle(g_iDriver[vehicleid], vehicleid, 0);
return 1;
}
return true;
}