Quote:
Originally Posted by Kudoz
pawn Код:
if(strcmp(cmd, "/respawnallcars", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 4) { SendClientMessage(playerid, COLOR_GRAD1, "** you are not an admin..."); return 1; } new bool:unwanted[MAX_VEHICLES]; for(new player=0; player<MAX_PLAYERS; player++) { if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; } } for(new car = 1; car <= 1850; car++) { if(!unwanted[car]) SetVehicleToRespawn(car); } GameTextForAll("~w~Every Unused Car ~n~~g~Respawned!",5000,1); new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Respawned All Unused Cars",d,m,y,h,mi,s,sendername); AdminLog(string); } return 1; }
btw this is viddo's script. Just add it to your script.
- Kudoz
|
By the way, This is a defined admin script, just replace your admin system with
Код:
if(PlayerInfo[playerid][pAdmin] < 4)
{
SendClientMessage(playerid, COLOR_GRAD1, "** you are not an admin...");
return 1;
}
If you want it for Rcon You can just use:
Код:
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COLOR_GRAD1, "** you are not an admin...");
return 1;
}