Need Help with /slap
#6

Quote:
Originally Posted by Drebin
Посмотреть сообщение
pawn Код:
SetPlayerHealth(id, -10.0);
This set's the playerid's health to -10, but he wants to reduce the health by 10:

pawn Код:
CMD:slap(playerid,params[])
{
    new id,
    new Float:health;
    reason[128],
    adminname[MAX_PLAYER_NAME],
    pname[MAX_PLAYER_NAME];
    GetPlayerName(id,pname,MAX_PLAYER_NAME);
    GetPlayerName(playerid,adminname,MAX_PLAYER_NAME);
    if(sscanf(params,"uz",id, reason)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /slap <playername/id> <reason>");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"ERROR: Player is not connected!");
    GetPlayerHealth(id, health);
    SetPlayerHealth(id, health -10.0);
    PlayerPlaySound(1149,0,0,0,0);
    return 1;
}
pawn Код:
new id,
    new Float:health;
    reason[128],
    adminname[MAX_PLAYER_NAME],
    pname[MAX_PLAYER_NAME];
There is already a new parameter.

Quote:
Originally Posted by GAMER_PS2
Посмотреть сообщение
i only want is example my health is 100 when it gets slap it will be 90
Check the command I posted above.
Reply


Messages In This Thread
Need Help with /slap - by GAMER_PS2 - 11.11.2011, 12:38
Re: Need Help with /slap - by Cypress - 11.11.2011, 12:39
Re: Need Help with /slap - by Biesmen - 11.11.2011, 12:42
AW: Need Help with /slap - by Drebin - 11.11.2011, 12:45
Re: Need Help with /slap - by GAMER_PS2 - 11.11.2011, 12:49
Re: AW: Need Help with /slap - by Cypress - 11.11.2011, 12:51
Re: Need Help with /slap - by GAMER_PS2 - 11.11.2011, 12:54
Re: AW: Need Help with /slap - by Biesmen - 11.11.2011, 12:54
AW: Need Help with /slap - by Drebin - 11.11.2011, 12:55
Re: Need Help with /slap - by Cypress - 11.11.2011, 12:55

Forum Jump:


Users browsing this thread: 4 Guest(s)