21.10.2014, 14:44
PHP код:
if(strcmp(cmd, "/unrentallcars", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1340)
{
SendClientMessage(playerid, COLOR_GRAD1, "[Eroare]: Ne pare rău,dar nu esti autorizat să folosesti această comandă!");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(HireCar[i] != 299)
{
if(idcar == HireCar[i])
{
TogglePlayerControllable(i, 1);
}
SetVehicleToRespawn(HireCar[i]);
gCarLock[HireCar[i]] = 0;
UnLockCar(HireCar[i]);
HireCar[i] = 299;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "SERVER: All rented cars unrented by {FF9900}%s{FFFFFF}.", sendername);
BroadCast(COLOR_WHITE,string);{return 1;}
}
}
}
return 1;
}