12.08.2017, 18:29
The title is pretty much self explanatory, I can't get this command to work from 4 days so far. The code is below, I have no idea what was done wrong, but any help is appreciated, like..really. I have tried pretty much anything I can think of and there is no effect. My goal is to delete any car in the server that is spawned, the gamemode is loading without any cars, but players leave vehicles everywhere because of a command which allows them to spawn them. I don't want to restrict that command to anything, so yeah.
PHP код:
if (strcmp("/destroycars", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
new name2[MAX_PLAYER_NAME];
for(new i=1;i<=MAX_VEHICLES;i++)
{
DestroyVehicle(i);
GetPlayerName(playerid, name2, sizeof(name2));
format(gstr, sizeof(gstr), "The almighty admin %s has destroyed all vehicles", name2);
SendClientMessageToAll(COLOR_SPAWN, gstr);
return 1;
}
}
}