BIGGEST problem
#1

--------
Reply
#2

Use the following links as reference of your droughts:

https://github.com/Y-Less/sscanf/wiki
https://sampwiki.blast.hk/wiki/Fast_Commands
https://sampwiki.blast.hk/wiki/Format
https://sampforum.blast.hk/showthread.php?tid=120356
https://sampforum.blast.hk/showthread.php?tid=280476
https://sampforum.blast.hk/showthread.php?tid=206237
Reply
#3

PHP код:
CMD:heal(playerid, params[])
{
    new
        
id;
    if (
sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/heal <playerid>\"");
    else if (
id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
    else
    {
        
SetPlayerHealth(id, 100.0);
        
SendClientMessage(id, 0x00FF00AA, "You have been healed");
        
SendClientMessage(playerid, 0x00FF00AA, "Player healed");
    }
    return 
1;
} 
Thing like that where is the code that make the player heal the other player with the id he typed ??
Reply
#4

Quote:
Originally Posted by nezo2001
Посмотреть сообщение
PHP код:
CMD:heal(playerid, params[])
{
    new
        
id;
    if (
sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/heal <playerid>\"");
    else if (
id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
    else
    {
        
SetPlayerHealth(id, 100.0);
        
SendClientMessage(id, 0x00FF00AA, "You have been healed");
        
SendClientMessage(playerid, 0x00FF00AA, "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
#5

Thank you man
Reply


Forum Jump:


Users browsing this thread: