SA-MP Forums Archive
Spawning saved 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: Spawning saved vehicle (/showthread.php?tid=496323)



Spawning saved vehicle - ross8839 - 21.02.2014

I'm just making a basic vehicular ownership system, but I don't know how to spawn the vehicle with a command. You buy the vehicle, it gets removed upon restart and then you type /spawncar to spawn it back in...

Thats what i have but i get a tag mismatch warning on the CreateVehicle line rep+ for anyone who answers, appreciate it

pawn Код:
CMD:spawncar(playerid, params[])
{
    new Float:x, Float:y, Flaot:z;
    if(PlayerInfo[playerid][pVehicle] == 0) return SendClientMessage(playerid, 0x0, "{F81414}Console: {FFFFFF}You don't own a vehicle!");
    AddStaticVehicleEx(PlayerInfo[playerid][pVehicle], x+5,y,z, 82.2873, 0, 1, 60);
    return 1;
}



Re: Spawning saved vehicle - MP2 - 21.02.2014

Show the declaration/definition of 'pVehicle' please.


Re: Spawning saved vehicle - Clad - 21.02.2014

You want command for spawning your vehicle to you right ?


Re: Spawning saved vehicle - ross8839 - 21.02.2014

pawn Код:
enum pInfo
{
    pPass[129],
    pCash,
    pAdmin,
    pScore,
    pKills,
    pDeaths,
    pKicked,
    pBanned,
    pWarned,
   
    pVehicle
}
and i just put x,y,z +5 because i'm just testing it out


Re: Spawning saved vehicle - J4mmyHD - 21.02.2014

new Float:x, Float:y, Flaot:z;

new Float:x, Float:y, Float:z;