[HELP] Ask && Report
#1

What am i doing wrong? It crashes my sevrer :S

pawn Код:
dcmd_report(playerid, params[])
{
    new targetid, reason;

    if(sscanf(params, "uz", targetid, reason)) return SendClientMessage(playerid, COLOR_USAGE, "bla bla");
    else if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_ERROR, "bla bla");
    //else if(playerid == targetid) return SendClientMessage(playerid, COLOR_ERROR, "bla bla");
    {
        new playername[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME], string[256];
        GetPlayerName(playerid, playername, sizeof(playername));
        GetPlayerName(targetid, targetname, sizeof(targetname));
       
        for (new i = 0; i < MAX_PLAYERS; i++)
        {
            if (IsPlayerConnected(i) && IsPlayerAdmin(i))
            {
                SendClientMessage(playerid, COLOR_ADMIN, "bla bla");
               
                format(string, sizeof(string), "bla bla",playername, playerid, targetname, targetid, reason);
                SendClientMessageToAll(0xFF0000FF, string);
                return 1;
            }
        }
        return 1;
    }
   
}
pawn Код:
dcmd_ask(playerid, params[])
{
    new question;
    if(sscanf(params, "z", question)) return SendClientMessage(playerid, COLOR_USAGE, "bla bla");
    {
        new playername[MAX_PLAYER_NAME], string[256];
        GetPlayerName(playerid, playername, sizeof(playername));

        for (new i = 0; i < MAX_PLAYERS; i++)
        {
            if (IsPlayerConnected(i) && IsPlayerAdmin(i))
            {
                SendClientMessage(playerid, COLOR_ADMIN, "bla bla");
               
                format(string, sizeof(string), "bla bla",playername, playerid, question);
                SendClientMessage(i, COLOR_ADMIN, string);
                return 1;
            }
        }
        return 1;
    }
}
Reply


Messages In This Thread
[HELP] Ask && Report - by Larsey123IsMe - 28.01.2011, 02:02
Re: [HELP] Ask && Report - by Leon_Rahil! - 28.01.2011, 02:12
Re: [HELP] Ask && Report - by Larsey123IsMe - 28.01.2011, 02:15
Re: [HELP] Ask && Report - by Calgon - 28.01.2011, 02:41
Re: [HELP] Ask && Report - by Larsey123IsMe - 28.01.2011, 02:49
Re: [HELP] Ask && Report - by Calgon - 28.01.2011, 02:54
Re: [HELP] Ask && Report - by Krx17 - 28.01.2011, 02:54
Re: [HELP] Ask && Report - by Larsey123IsMe - 28.01.2011, 02:55

Forum Jump:


Users browsing this thread: 4 Guest(s)