still getting this problem
#1

this cmd seems that wont work lol..
pawn Код:
CMD:report(playerid,params[])
{
    new targetid, reason[60], Str[128], sName[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME];
    if(sscanf(params,"us[60]", targetid, reason)) return SendClientMessage(playerid, lb,"USAGE: /report [playerid/partofname] [reason]");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, red,"Invalid player ID");
    else
    {
        GetPlayerName(targetid, pName, sizeof(pName));
        GetPlayerName(playerid, sName, sizeof(sName));
        sName[strfind(sName,"_")] = ' ';
        format(Str, sizeof(Str), "[ID:%d] %s has reported %s: %s.", playerid, sName, pName, reason);
        ABroadCast(yel, Str, 1);
        format(Str, sizeof(Str), "Use /markfalse [id] or /acceptreport [id]");
        ABroadCast(yel, Str, 1);
        format(Str, sizeof(Str), "Your report was just send to the online admins, please wait for a reply");
        SendClientMessage(playerid, COLOR_ORANGE, Str);
        PlayerNeedsHelp[playerid] = 1;
    }
    return 1;
}
ABroadCast:
pawn Код:
forward ABroadCast(color,const string[],level);
public ABroadCast(color,const string[],level)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if (PlayerInfo[i][pAdmin] >= level)
            {
                SendClientMessage(i, color, string);
            }
        }
    }
    return 1;
}
Reply
#2

no problem solved.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)