/slap command
#7

Use this...
pawn Код:
CMD:slap(playerid, params[])
{
    if(AccountInfo[playerid][AdminLevel] >= 1)
    {
        new id;
        if(!sscanf(params, "u", id))
        {
            new Name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME], string[128], Float:px, Float:py, Float:pz;
            GetPlayerName(playerid, Name, sizeof(Name));
            GetPlayerName(id, PlayerName, sizeof(PlayerName));
            GetPlayerPos(id, px, py, pz);
            SetPlayerPos(playerid, px, py, pz+10);
            format(string, sizeof(string), "You have been slapped by administrator %s.", Name);
            SendClientMessage(id, 0xFFFFFFFF, string);
            format(string, sizeof(string), "You slapped %s.", PlayerName);
            SendClientMessage(playerid, 0xFFFFFFFF, string);
            return 1;
        }
        else return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /slap [PlayerId/PartOfName]");
    }
    else return SendClientMessage(playerid, 0xFFFFFFFF, "You are not alowed to use this command.");
}
Reply


Messages In This Thread
/slap command - by [D]ry[D]esert - 08.05.2012, 15:03
Re: /slap command - by [D]ry[D]esert - 08.05.2012, 16:19
Re: /slap command - by doreto - 08.05.2012, 16:24
Re: /slap command - by [D]ry[D]esert - 08.05.2012, 16:27
Re: /slap command - by Kindred - 08.05.2012, 16:28
Re: /slap command - by DamienWalter - 15.05.2012, 12:37
Re: /slap command - by ricardo178 - 15.05.2012, 12:49

Forum Jump:


Users browsing this thread: 2 Guest(s)