A problem with my /jail command.
#4

pawn Код:
dcmd_jail(playerid,params[])
    {
    new Reason[256], pID, time;
    if(Player[playerid][Admin] < 1){
    SendClientMessage (playerid,COLOR_BRIGHTRED,"Tev nav autorizācijas lietot љo komandu.");
    return 1;
    }
    if(sscanf(params,"uds",pID,time,Reason)){
    return SendClientMessage(playerid,COLOR_BRIGHTRED,"Pielietojums: /jail [ID] [Laiks] [Iemesls]");
    }
    if(!IsPlayerConnected(pID)) {
    return SendClientMessage(playerid,COLOR_BRIGHTRED,"Spēlētājs ar љādu ID nēeksistē.");
    }
    if(Player[playerid][Admin] < Player[pID][Admin]){
    return SendClientMessage(playerid,COLOR_BRIGHTRED,"Tu nevari ielikt augstākas pakāpes adminu cietumā.");
    }
    if(TeamKill[pID] == 1) {
    return SendClientMessage(playerid,COLOR_BRIGHTRED,"Spēlētājs jau atrodas cietumā.");
    }
    new
    name[MAX_PLAYER_NAME],
    string[256];
    GetPlayerName(pID,name,sizeof(name));
    format(string,sizeof(string),"Admins ielika %s cietumā uz %d sekundēm. [Iemesls: %s]",name,JTime,Reason);
    SendClientMessageToAll(COLOR_WHITE,string);
    TeamKill[pID] = 1;
    JailTime(pID);
    SetPlayerPos(pID,-11.5327,2328.8679,24.1406);
    TextDrawShowForPlayer(pID, JailTextDraw[pID]);
    return 1;
}
Reply


Messages In This Thread
A problem with my /jail command. - by Shetch - 04.03.2011, 23:08
Re: A problem with my /jail command. - by AK47317 - 04.03.2011, 23:12
Re: A problem with my /jail command. - by Shetch - 05.03.2011, 00:03
Re: A problem with my /jail command. - by Marricio - 05.03.2011, 00:14
Re: A problem with my /jail command. - by Shetch - 05.03.2011, 21:18
Re: A problem with my /jail command. - by Loppa - 05.03.2011, 22:53

Forum Jump:


Users browsing this thread: 2 Guest(s)