28.02.2012, 03:04
hi im wondering why when i type /repairall that it only says had repaired all vehicles and not the admin name
pawn Код:
COMMAND:repairall(playerid, params[])
{
new AdminName[24], string[256], Name[24];
// Send the command to all admins so they can see it
SendAdminText(playerid, "/repairall", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 3
if (APlayerData[playerid][PlayerLevel] >= 3)
{
// Loop through all vehicles
for (new i; i < 2000; i++)
RepairVehicle(i); // Fully repair the vehicle (damage value and bodywork)
// Send all players a message to inform them that all vehicles have been repaired
format(string, 256, "{ffff00}%s Has Repaired All Vehicles", AdminName, Name);
SendClientMessageToAll(0xff00FF,string);
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}