Call Reserved Car Script 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: Call Reserved Car Script Help (
/showthread.php?tid=262238)
Call Reserved Car Script Help -
TyThaBomb - 17.06.2011
Well, I wanted to make a script to where when you typed the command /rcar, it would bring your car that's reserved to you on the server to where you are, but I'm not having much luck. Any ideas?
Re: Call Reserved Car Script Help -
TyThaBomb - 18.06.2011
Bump?
Re: Call Reserved Car Script Help -
Lorenc_ - 18.06.2011
Something like this:
pawn Код:
CMD:bringcar(playerid, params[])
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
for(new i; i <MAX_VEHICLES; i++);
{
if(strmatch(gVehicleData[i][E_OWNER], ReturnPlayerName(playerid))
{
SetVehiclePos(playerid, X+random(3), Y+random(3), Z+5);
}
else return SendClientMessage(playerid, 0xFFFFFFFF, "You dont have any cars!");
}
return 1;
}
stock strmatch(const String1[], const String2[])
{
if ((strcmp(String1, String2, true, strlen(String2)) == 0) && (strlen(String2) == strlen(String1))) {
return true;
}
else {
return false;
}
}
Untested though you need to change the variable to your vehicle system variable settings..