admin wanted command
#3

Not a lot of people use dcmd anymore.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(su, 2, cmdtext);
    dcmd(suspect, 7, cmdtext);
    return 0;
}

dcmd_su(playerid, params[])
{
    new
        reason[50],
        giveplayerid,
        gWantedLevel,
        string[128],
        copname[24],
        gName[24]
    ;
    if(sscanf(params, "us", giveplayerid, reason))
    {
        return SendClientMessage(playerid, -1, "USAGE: /(su)spect [playerid] [crime]");
    }
    GetPlayerName(playerid, copname, 24);
    GetPlayerName(giveplayerid, gName, 24);
    format(string, sizeof(string), "Officer %s has suspected you, reason: %s", copname, reason);
    SendClientMessage(giveplayerid, *YOURCOLORHERE*, string);
    format(stirng, sizeof(string), "You have suspected %s, reason: %s",gName, reason);
    SendClientMessage(playerid, *YOURCOLORHERE*, string);
    gWantedLevel = GetPlayerWantedLevel(giveplayerid);
    SetPlayerWantedLevel(giveplayerid, gWantedLevel + 1);
    return 1;
}
dcmd_suspect(playerid, params[]) return dcmd_su(playerid, params);
Reply


Messages In This Thread
admin wanted command - by JAMMIEISFTW - 29.04.2012, 14:14
Re: admin wanted command - by JAMMIEISFTW - 29.04.2012, 14:50
Re: admin wanted command - by ReneG - 29.04.2012, 15:01
Re: admin wanted command - by WarriorEd22 - 29.04.2012, 15:08
Re: admin wanted command - by JAMMIEISFTW - 29.04.2012, 15:13
Re: admin wanted command - by WarriorEd22 - 29.04.2012, 15:16
Re: admin wanted command - by Mark™ - 29.04.2012, 15:41
Re: admin wanted command - by JAMMIEISFTW - 29.04.2012, 15:47
Re: admin wanted command - by Mark™ - 29.04.2012, 15:54
Re: admin wanted command - by JAMMIEISFTW - 30.04.2012, 05:46

Forum Jump:


Users browsing this thread: 4 Guest(s)