23.05.2016, 19:42
When I log into the server, the vehicles are not there except personal vehicles, so 'CreateVehicleEx's' are not showing up within game.
public OnFilterScriptInit()
native IsValidVehicle(vehicleid);
// Count vehicles
public OnPlayerCommandText(playerid,cmdtext[])
{
if(!strcmp(cmdtext,"/countvehicles",true))
{
new
count,
msg[60];
for(new i; i < MAX_VEHICLES; i++)
{
if(IsValidVehicle(i)) count++;
}
format(msg, sizeof(msg), "* There are %d valid spawned vehicles on this server.", count);
SendClientMessage(playerid, 0x33CCCCFF, msg);
return 1;
}
return 0;
}