- 0
Comanda /hac
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
mR.KerigaN
Nick: mR.KerigaN
Problema: am o problema la comanda /hac care repara toate masinile dupa server cand dau /hac repara doar masinile care sunt conduse
Erori / warnings: nu imi da erori
Lini/script: if(strcmp(cmd, "/hac", true) == 0 ||strcmp(cmd, "/hac", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(playerid))
{
if(AdminDuty[playerid] == 1 && PlayerInfo[playerid][pAdmin] >= 1||HelperDuty[playerid] == 1 && PlayerInfo[playerid][pHelper] >= 2 )
{
//format(string, sizeof(string), "{FFFFFF}Admin{FF9900} %s {FFFFFF}has repair all cars.", sendername);
//SendClientMessageToAll(0xFF7171FF, string);
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, 30000000000000000000000000000000000000000000000000000000000, x, y, z))
{
RepairCar = GetPlayerVehicleID(i);
SetVehicleHealth(i, 1000.0);
RepairVehicle(RepairCar);
format(string, sizeof(string), "{FF0000} %s {FFFFFF}repaired all cars.", sendername);
SendClientMessage(i,0xFF7171FF, string);
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Nu esti Helper/Admin on Duty!");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
}
return 1;
}
Ai incercat sa rezolvi singur ?: Da
2 answers to this question
Recommended Posts