Vehicle system 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)
+--- Thread: Vehicle system help. (
/showthread.php?tid=444927)
Vehicle system help. -
Rokzlive - 18.06.2013
Im trying to make a way so that if a car is owned and you dont own it you cannot enter it as a driver, but can enter as a passenger. My current one wont let you enter as a passenger.
Here is what ive made of the new function
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(IsOwnedVehicle[vehicleid] == 1)
{
if(strcmp(PlayerName(playerid),pCar[vehicleid][OVowner]))
{
if(ispassenger == 0)
{
SendClientMessage(playerid,COLOR_RED,"You don't own this vehicle!");
return 0;
}
if(ispassenger == 1)
{
return 1;
}
}
}
return 1;
}