Owner's CAR - 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: Owner's CAR (
/showthread.php?tid=225878)
Owner's CAR -
Stunt_Guy - 14.02.2011
I Saw On A Stunt Server .. On The Random Spawn .. I Have Spawned On A Stunt Area .. And I SAW .. A Big Car With Nitrous And Modded And It's Awesome Then I Try To Drive It ... It Says To Me You Can't Drive This Car .. Only The owner .. Anyone Here Know how to do this script ?? ...
Re: Owner's CAR -
_Tommy - 14.02.2011
When a player changes his state, check if a player is the owner of the vehicle.
In order to make this work, you will have to create a player stats system, in order to set the player's owned vehicle.
Re: Owner's CAR -
iJumbo - 14.02.2011
Example script of what _Tommy say
frist make a new
like
then create the car with mycar name
like
pawn Код:
mycar = AddStaticVehicle(blablablabla
then in when player change the state
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new V = GetPlayerVehicleID(playerid);
if(V == mycar)
{
if(IsPlayerAdmin(playerid))
{
return 1;
}
else
{
SendClientMessage(playerid,0xFF0000AA, "Admin vehicle");
//removeplayervehiclething
}
}
}
return 1;
}
if u are admin u can enter in the car ... idk if work xD i dont remember
Re: Owner's CAR -
Stunt_Guy - 14.02.2011
Ok Thx For Comments
((Now I Can Make many MODDED Cars With Players Who I Want And Me Too

on My Admin House))
THX