zcmd optional integer help
#4

Why not a normal jail command? Normal jail command is for example:

pawn Код:
COMMAND:jail(playerid, params[])
{
    new id;
    if(IsPlayerConnected(id))
    {
        if(IsPlayerAdmin(playerid))
        {
            if(!sscanf(params, "u", id))
            {
                new string[64];
                new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
                GetPlayerName(playerid, name, sizeof(name));
                GetPlayerName(id, PlayerName, sizeof(PlayerName));
                format(string, sizeof(string), "You have been jailed by %s.", name);
                SendClientMessage(id, 0x0259EAAA, string);
                format(string, sizeof(string), "You jailed %s .", PlayerName);
                SendClientMessage(playerid, 0x0259EAAA, string);
                SetPlayerPos(id, 264.6288,77.5742,1001.0391);
                SetPlayerInterior(id, 3);
                return 1;
            }
            else return SendClientMessage(playerid, 0x0259EAAA, "USAGE: /jail [PlayerId/PartOfName]");
        }
        else return SendClientMessage(playerid, 0x0259EAAA, "You are not admin.");
    }
    else return SendClientMessage(playerid, 0x0259EAAA, "Player is not connected.");
}
Reply


Messages In This Thread
zcmd optional integer help - by THE_KNOWN - 18.03.2011, 08:27
Re: zcmd optional integer help - by iggy1 - 18.03.2011, 09:05
Re: zcmd optional integer help - by THE_KNOWN - 18.03.2011, 09:12
Re: zcmd optional integer help - by ricardo178 - 18.03.2011, 09:20
Re: zcmd optional integer help - by THE_KNOWN - 18.03.2011, 09:30
Re: zcmd optional integer help - by THE_KNOWN - 18.03.2011, 15:12
Re: zcmd optional integer help - by THE_KNOWN - 18.03.2011, 16:44

Forum Jump:


Users browsing this thread: 2 Guest(s)