[HELP] /aheal command !
#7

Quote:
Originally Posted by [Aka]Dragonu
Посмотреть сообщение
BUMP !!!!
It may help you to read the wiki (especially on strtok and OnPlayerCommandText)
- If this thread is not properly answered when i get on my laptop i will attempt to help you

This forum requires that you wait 120 seconds between posts. Please try again in 8 seconds.

Edit: Try this...
pawn Код:
if(strcmp("/aheal", cmdtext) == 0)
{
    new idx, pid, tmp, pName[MAX_PLAYER_NAME], pName2[MAX_PLAYER_NAME], string[128];
    tmp = strtok(cmdtext, idx);
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOUR, "Administration Level Required");
    if(!strlen(tmp)) return SendClientMessage(playerid, COLOUR, "Usage: /aheal [playerid]");
    pid = strval(tmp);
    if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOUR, "This player is not connected");
   
    SetPlayerHealth(pid, 100.0);
   
    GetPlayerName(playerid, pName, sizeof(pName));
    GetPlayerName(pid, pName2, sizeof(pName2));
    format(string, sizeof(string), "%s was healed by %s", pName2, pName);
    SendClientMessageToAll(COLOUR, string);
   
}

//Usage: /aheal [playerid]
Remember to change COLOUR to the colour (color) that you want...
Reply


Messages In This Thread
[HELP] /aheal command ! - by [Aka]Dragonu - 03.12.2010, 20:21
Re: [HELP] /aheal command ! - by gychem - 03.12.2010, 20:23
Re: [HELP] /aheal command ! - by [Aka]Dragonu - 03.12.2010, 20:27
Re: [HELP] /aheal command ! - by gychem - 03.12.2010, 20:40
Re: [HELP] /aheal command ! - by [Aka]Dragonu - 03.12.2010, 20:52
Re: [HELP] /aheal command ! - by [Aka]Dragonu - 04.12.2010, 07:02
Re: [HELP] /aheal command ! - by Ash. - 04.12.2010, 07:08
Re: [HELP] /aheal command ! - by [Aka]Dragonu - 04.12.2010, 07:46
Re: [HELP] /aheal command ! - by fangoth1 - 04.12.2010, 10:12
Re: [HELP] /aheal command ! - by fangoth1 - 04.12.2010, 10:25

Forum Jump:


Users browsing this thread: 1 Guest(s)