08.05.2016, 18:59
When you type the command, nothing appears ?
Put some print, every like that :
And show us what the command invit return
Put some print, every like that :
PHP код:
CMD:healall(playerid, params[])
{
new str[128];
if(pInfo[playerid][Logged] == 0) return SendClientMessage(playerid, COLOR_RED, "[Error]: You must be logged in!");
print("Starting.. /healall");
if(pInfo[playerid][Admin] >= 4)
{
SendAdminCMD(playerid, "healall", 0);
printf("Player (ID: %i) Allowed to heal all players.", playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
printf("Player : ID : %i - Heal ?", i);
if(IsPlayerConnected(i) && (i != playerid) && (pInfo[playerid][Admin] > pInfo[i][Admin]) && InP[i] == 0 && InDM[i] == 0 && pInfo[i][Jail] == 0 && God[i][0] == 0 && God[i][1] == 0)
{
PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
SetPlayerHealth(i, 100.0);
SetPlayerArmour(playerid, 100.0);
printf("Player : ID : %i - Healed !", i);
}
}
print("All Player get healed.");
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
format(str, sizeof(str), "Administrator %s(%d) has healed all players!", GetName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, str);
}
else return SendClientMessage(playerid, COLOR_RED, EACMD);
return 1;
}