Vehicle UID - 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: Vehicle UID (
/showthread.php?tid=392880)
Vehicle UID -
PapaSmerf - 16.11.2012
Edit: I made this:
Код:
CMD:testcar(playerid, cmdtext[])
{
if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, -1, "Sorry but you don't have money!");
{
new CreateCar[35];
for(new i = 0; i <= MAX_VEHICLES; i++)
{
format(CreateCar,sizeof (CreateCar), MODERN_VEHICLES, i);
if(!DOF2_FileExists(CreateCar))
{
DOF2_CreateFile(CreateCar);
return 1;
}
break;
}
}
return 1;
}
Only creates 0.ini... Where is the problem?
Re: Vehicle UID -
PapaSmerf - 16.11.2012
// Refresh
Re: Vehicle UID -
iGetty - 16.11.2012
Don't bump your topics.
Also, make a variable at the top of the script with carTotal;
Set it to 0 in OnGameModeInit.
Then when you load vehicles; add 1 to it each time.
Then, on the testcar command; use carTotal as the file name, so then it's loading by ID.