04.08.2016, 09:12
Код:
new rand = random(3000) + 1500; new string[24]; format(string, sizeof(string), "{D20000}BG-{FFFFFF}%d", rand); SetVehicleNumberPlate(vehicleid, string);
Код:
Undefined Simbol vehicleid
new rand = random(3000) + 1500; new string[24]; format(string, sizeof(string), "{D20000}BG-{FFFFFF}%d", rand); SetVehicleNumberPlate(vehicleid, string);
Undefined Simbol vehicleid
new rand = random(3000) + 1500, vehicleid = GetPlayerVehicleID(playerid); new string[24]; format(string, sizeof(string), "{D20000}BG-{FFFFFF}%d", rand); SetVehicleNumberPlate(vehicleid, string);
public OnGameModeInit() { SetGameModeText("BA:RP V.0.1.0"); new rand = random(3000) + 1500, vehicleid = GetPlayerVehicleID(playerid); new string[24]; format(string, sizeof(string), "{D20000}BG-{FFFFFF}%d", rand); SetVehicleNumberPlate(vehicleid, string); return 1; }
OnGameModeInIt doesn't have a playerid paramater.
Try using it under OnPlayerConnect(playerid)? |
native IsValidVehicle(vehicleid); // <- add this after a_samp include
for(new i = 0; i < MAX_VEHICLES; i++)
{
if(!IsValidVehicle(i)) continue;
new rand = random(3000) + 1500;
new string[24];
format(string, sizeof(string), "{D20000}BG-{FFFFFF}%d", rand);
SetVehicleNumberPlate(i, string);
}
how player will have vehicle on his connect D: ?
after creating your vehicles add this code PHP код:
|
for (new i, j = GetVehiclePoolSize(); i <= j; i++)
SetVehicleNumberPlate(i, string); SetVehicleToRespawn(i); }