/ajail
#2

Add that one
pawn Код:
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
                        while ((idx < length) && (cmdtext[idx] <= ' '))
                        {
                            idx++;
                        }
                        new offset = idx;
                        new result[64];
                        while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                        {
                            result[idx - offset] = cmdtext[idx];
                            idx++;
                        }
                        result[idx - offset] = EOS;
                        if(!strlen(result))
                        {
                            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ajail [playerid] [minuted] [reason]");
                            return 1;
                        }
and then just make a string
pawn Код:
format(string, sizeof(string), "%s was jailed by Administrator %s, reason: %s", giveplayer, sendername, (result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
Reply


Messages In This Thread
/ajail - by Agent Smith - 08.05.2009, 17:55
Re: /ajail - by Dark_Kostas - 08.05.2009, 17:59
Re: /ajail - by Agent Smith - 08.05.2009, 18:02
Re: /ajail - by Dark_Kostas - 08.05.2009, 18:02
Re: /ajail - by Agent Smith - 08.05.2009, 18:08
Re: /ajail - by hoodline - 08.05.2009, 18:16
Re: /ajail - by Agent Smith - 08.05.2009, 18:22
Re: /ajail - by Dark_Kostas - 08.05.2009, 18:36
Re: /ajail - by Agent Smith - 08.05.2009, 18:39
Re: /ajail - by Dark_Kostas - 08.05.2009, 18:42

Forum Jump:


Users browsing this thread: 1 Guest(s)