slap command
#4

My Version
pawn Код:
CMD:slap(playerid, params[])
{
    if(PlayerInfo[playerid][AdminLevel] >= 2)
    {
        new targetid;
        if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_YELLOW, "Correct Usage: /slap [playerid]");
        if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "ERROR: invalid playerid");
        new Float:x, Float:y, Float:z;
        GetPlayerPos(targetid, x, y, z);
        SetPlayerPos(targetid, x, y, z+10);
        PlaySound(targetid, 1190);
        new name[MAX_PLAYER_NAME], string[128];
        GetPlayerName(targetid, name, sizeof(name));
        format(string, sizeof(string), "you have slapped %s", name);
        SendClientMessage(playerid, PLAYERCOLOR_AQUA, string);
        SendCommandToAdmins(playerid,"/slap");
    }
    else return SendClientMessage(playerid, COLOR_RED, "ERROR: you need to be atleast Admin Level 3 to start a HnS Event");
    return 1;
}
Reply


Messages In This Thread
slap command - by Felipee - 28.11.2013, 17:07
Re: slap command - by Felipee - 30.11.2013, 13:06
Re: slap command - by xVIP3Rx - 30.11.2013, 13:27
Re: slap command - by ReApZ - 30.11.2013, 14:10
Re: slap command - by newbie scripter - 30.11.2013, 14:26

Forum Jump:


Users browsing this thread: 1 Guest(s)