Admin chat
#1

Hey im usind zcmd and sscanf and want to make a /a command that only admins can use, and everyone in the server can see it how can i make it?

Im scripting my Admin cmds like this:

pawn Код:
CMD:slap(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new
            pID;
        if(sscanf(params, "u", pID))
        {
            return 0;
        } else {
            if(!IsPlayerConnected(pID))
            {
                SendMessage(playerid, 0xFF000FFF, "s", "That player is not connected or not signed in!");
            } else {
                SendMessage(pID, 0xFF000FFF, "sss", "Administrator ", GetName(playerid), " has killed you.");
                SendMessageToAll(0xFF000FFF, "ss", GetName(pID), " has been Admin killed by Administrator", GetName(playerid));
                SetPlayerHealth(playerid,0);

            }
            return 1;
        }
    }
    return 0;
}
Reply


Messages In This Thread
Admin chat - by Santox14 - 04.11.2011, 16:49
Re: Admin chat - by SmiT - 04.11.2011, 17:05
Re: Admin chat - by Zonoya - 04.11.2011, 17:12
Re: Admin chat - by SmiT - 04.11.2011, 17:13
Re: Admin chat - by Zonoya - 04.11.2011, 17:14
Re: Admin chat - by Kingunit - 04.11.2011, 17:20
AW: Admin chat - by Santox14 - 04.11.2011, 17:30
Re: Admin chat - by Zonoya - 04.11.2011, 17:31
Re: Admin chat - by Kingunit - 04.11.2011, 18:12
AW: Admin chat - by Santox14 - 04.11.2011, 18:47

Forum Jump:


Users browsing this thread: 3 Guest(s)