#8

This should do the trick...

pawn Код:
CMD:slap(playerid, params[])
{
    if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /slap <playerid>");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_DARKRED, "[ERROR:] This ID is has not been found.");
    else
    {
        new Float:X, Float:Y, Float:Z, Float:Health, str[128], name[MAX_PLAYER_NAME];

        PlayerPlaySound(id, 1190, X, Y, Z);
        SetPlayerHealth(id, Health-25);

        GetPlayerPos(id, X, Y, Z);
        SetPlayerPos(id, X, Y, Z+7);

        GetPlayerName(id, pName, sizeof(name));
        GetPlayerName(id, aName, sizeof(name));
        format(str, sizeof(str), "%s was slapped by %s", pName, aName);
        SendClientMessageToAll(COLOR_DARKRED, str);
    }
    return 1;
}
Reply


Messages In This Thread
Hmm? - by Luis- - 29.11.2010, 15:45
Re: Hmm? - by MadeMan - 29.11.2010, 15:48
Re: Hmm? - by Luis- - 29.11.2010, 15:50
Re: Hmm? - by Luis- - 29.11.2010, 16:23
Re: Hmm? - by Scenario - 29.11.2010, 16:24
Re: Hmm? - by [03]Garsino - 29.11.2010, 16:27
Re: Hmm? - by Luis- - 29.11.2010, 16:27
Re: Hmm? - by Scenario - 29.11.2010, 16:33
Re: Hmm? - by [03]Garsino - 29.11.2010, 16:35
Re: Hmm? - by Luis- - 29.11.2010, 16:41

Forum Jump:


Users browsing this thread: 1 Guest(s)