BIGGEST problem
#4

Quote:
Originally Posted by nezo2001
Посмотреть сообщение
PHP код:
CMD:heal(playeridparams[])
{
    new
        
id;
    if (
sscanf(params"u"id)) SendClientMessage(playerid0xFF0000AA"Usage: \"/heal <playerid>\"");
    else if (
id == INVALID_PLAYER_IDSendClientMessage(playerid0xFF0000AA"Player not found");
    else
    {
        
SetPlayerHealth(id100.0);
        
SendClientMessage(id0x00FF00AA"You have been healed");
        
SendClientMessage(playerid0x00FF00AA"Player healed");
    }
    return 
1;

Thing like that where is the code that make the player heal the other player with the id he typed ??
"if(sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/heal <playerid>\"");"

Entered player ID stored in the variable "id".

"SetPlayerHealth(id, 100.0);"

Set the player with the entered ID (stored in "id") to 100.
Reply


Messages In This Thread
------- - by nezo2001 - 27.12.2014, 19:05
Re: BIGGEST problem - by SickAttack - 27.12.2014, 19:16
Re: BIGGEST problem - by nezo2001 - 27.12.2014, 19:25
Re: BIGGEST problem - by SickAttack - 27.12.2014, 19:32
Re: BIGGEST problem - by nezo2001 - 27.12.2014, 19:39

Forum Jump:


Users browsing this thread: 1 Guest(s)