/complain Command Isn't Looping?
#3

Quote:
Originally Posted by skullmuncher1337
Посмотреть сообщение
pawn Код:
dcmd_complain(playerid, params[])
{
    new id, pName[MAX_PLAYER_NAME], idName[MAX_PLAYER_NAME], report[128], string[128];
    if(sscanf(params,"us[128]",id,report)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /complain (nick/id) (complaint) - Enter A Valid Nick / ID");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "That ID/Player Isn't Valid");
    if(id == playerid) return SendClientMessage(playerid,COLOR_RED,"You Cannot Complain About Yourself.");
    GetPlayerName(playerid,pName,sizeof(pName));
    GetPlayerName(id,idName,sizeof(idName));
    format(string,sizeof(string),"{FFFFFF}Complaint About {8E5FE1}%s(%d) {FFFFFF}Sent. ({00AAFF}%s{FFFFFF})",idName,id,report);
    SendClientMessage(playerid,COLOR_RED,string);
    GameTextForPlayer(playerid, "~w~Complaint Sent", 3000, 4);
    for(new i; i<MAX_PLAYERS; i++)
        {
              if(PlayerInfo[i][pAdminLevel] >= 1)
              {
        format(report,sizeof(report),"{FFFFFF}Player {8E5FE1}%s(%d) {FFFFFF}Complained About  {8E5FE1}%s(%d) {FFFFFF}({00AAFF}%s{FFFFFF})",pName,playerid,idName,id,report);
              SendClientMessage(i,COLOR_RED,report);
              GameTextForPlayer(i, "~r~Complaint ~w~Received", 5000, 4);
              PlayerPlaySound(i, 1058, 0.0, 0.0, 10.0);
          }
     }
    return 1;
}
Edit: Stupid Indentation lol
Thanks il try that in a minute

Ellie
Reply


Messages In This Thread
/complain Command Isn't Looping? - by Ely - 27.10.2011, 20:28
Re: /complain Command Isn't Looping? - by skullmuncher1337 - 27.10.2011, 20:30
Re: /complain Command Isn't Looping? - by Ely - 27.10.2011, 20:44
Re: /complain Command Isn't Looping? - by Ely - 28.10.2011, 12:57

Forum Jump:


Users browsing this thread: 1 Guest(s)