SA-MP Forums Archive
Cars system - 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: Cars system (/showthread.php?tid=645060)



Cars system - zZzTGTzZz - 19.11.2017

I need a command to create cars for sale and to keep them saved

CMD:createvehicle(playerid, params[])
{
new cadena[52], modelo, Float:X, Float:Y, Float:Z;
if(!sscanf(params, "i", modelo))
GetPlayerPos(playerid, X, Y, Z);
Vehiculo[playerid] = CreateVehicle(modelo, X, Y, Z, 0, 0, 0, -1);
PutPlayerInVehicle(playerid, Vehiculo[playerid], 0);
format(cadena, sizeof(cadena), "Created vehicle! ID %d", modelo);
SendClientMessage(playerid, -1, cadena);
}
else SendClientMessage(playerid, -1, "[!] Usage /createvehicle <ID>");
return 1;
}


Re: Cars system - Lucases - 19.11.2017

Use an sqlite database to save and load player vehicles.

https://sampwiki.blast.hk/wiki/SQLite