Vehicle UID
#1

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?
Reply
#2

// Refresh
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)