help with arrest command
#3

pawn Код:
CMD:arrest(playerid,params[])
{
    if(gTeam[playerid] == TEAM_POLICE)
    {
        new pId;
        if(sscanf(params, "dds", pId, time, params[3])) return SendClientMessage(playerid, red, "Usage: /arrest [ID] ");
            else if(!IsPlayerConnected(pId)) return SendClientMessage(playerid, 0xFF0000AA, "Invalid Id.");
                else
                {
                    new pname[MAX_PLAYER_NAME], jname[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, pname, sizeof(pname));
                    GetPlayerName(pId, jname, sizeof(jname));
                    SetPlayerInterior(pId, 3);
                    new rand = random(sizeof(JailCellSpawns));
                    SetPlayerPos(pId, JailCellSpawns[rand][0], JailCellSpawns[rand][1], JailCellSpawns[rand][2]);
                    SetPlayerWantedLevel(pId, 0);
                    format(string1, sizeof(string1), "%s(%d) Has Been Jailed By Officer %s(%d) ", jname, pId, pname, playerid);
                    SendClientMessageToAll(0xFF0000AA, string1);
                    GameTextForPlayer(playerid, "~r~JAILED ", 3000, 3);

                    return 1;
                }
            }
            else SendClientMessage(playerid,COLOR_RED,"You are not authorized for use this command!");
    {
                return 0;
            }
Reply


Messages In This Thread
help with arrest command - by 1fret - 09.10.2014, 17:53
Re: help with arrest command - by YanLanger - 09.10.2014, 17:56
Re: help with arrest command - by 1fret - 09.10.2014, 17:59
Re: help with arrest command - by Abagail - 09.10.2014, 22:17

Forum Jump:


Users browsing this thread: 2 Guest(s)