Have Many bugs
Brb
if player goes to brb anyone will kill him!
easily!
second bug
This Cannot Be Used As A Timer
public Healing(playerid)
{
TogglePlayerControllable(playerid, 1);
SetPlayerHealth( playerid, 100.0 );
SendClientMessage( playerid, COLOR_YELLOW, ">> You have been healed!" );
}
else if ( strcmp( cmd, "!heal", true ) == 0 )
{
new Float:Health; GetPlayerHealth( playerid, Health );
if ( Health >= 100 ) SendClientMessage( playerid, COLOR_YELLOW, ">> Error: You are healthy." );
else
{
TogglePlayerControllable(playerid,0);
SetTimer("Healing",5000,0);
SetPlayerHealth( playerid, 100.0 );
GameTextForPlayer(playerid, "Healed.. ~w~5 Second wait.");
}
return 1;
}
Make A Loop For It
Add
[pawn]PlayerIsHealing[MAX_PLAYERS];[/pawn]
Add This In Heal Command
[pawn]PlayerIsHealing[playerid] = 1;[/pawn]
use this public
[pawn]public Healing()
{
for (i ;i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) {
if(PlayerIsHealing == 1) {
TogglePlayerControllable(i, 1);
SetPlayerHealth( i, 100.0 );
PlayerIsHealing = 0;
SendClientMessage( i, COLOR_YELLOW, ">> You have been healed!" );
}
}
}
return 1;
}
[/pawn]