06.03.2011, 23:08
Could someone help me with this?
I want to make so those cars people are driving wont reset
heres the code i use.
I want to make so those cars people are driving wont reset
heres the code i use.
PHP код:
if(strcmp(cmd, "/resetcars", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
format(string, sizeof(string), "All cars have been respawned by admin");
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
{
SendClientMessage(i, COLOR_LIGHTBLUE, string);
}
}
for(new car = 1; car <= 1850; car++)
{
SetVehicleToRespawn(car);
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " You are not authorized to use this command.");
return 1;
}
}
return 1;
}