SA-MP Forums Archive
Dynamic Vehicle [Rent] - 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: Dynamic Vehicle [Rent] (/showthread.php?tid=193136)



Dynamic Vehicle [Rent] - Anthonyx3' - 25.11.2010

Hey guys, im working on my Roleplay Gamemode from scratch and i thought this would be sorta unique. I want to make a rent system, which is dynamic. So say someone owns the rent car shop, they can use a simple cmd like /setrentcar and that car would be a rentable car. How would i go about making something like this?

Thanks in advance.


Re: Dynamic Vehicle [Rent] - Jacob_Venturas - 25.11.2010

pawn Код:
if(strcmp(cmd,"/setrentalcar",true)==0)//xkniives
  {
IsRentalVehicle[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid)
{
 if(IsRentalVehicle[vehicleid] == 1)
{
///do something here
}
}

Don't copy and paste. I'm just giving you an idea of what you can do.


Re: Dynamic Vehicle [Rent] - Anthonyx3' - 25.11.2010

Thanks for the idea, i think i got an idea on how to do this.