10.08.2010, 11:38
(
Last edited by gtg2808; 10/08/2010 at 06:10 PM.
)
i know about scanf. lol. k, i got a bug but not an error.
i tried !heal <id>
need a help!
bug:-
and ingame , i didn't got health - 100
i tried !heal <id>
need a help!
Code:
IRCCMD:heal(botid, channel[], user[], params[], playerid) { new iD,main[256],amain[256],name[MAX_PLAYER_NAME]; if (sscanf(params, "u", iD)) IRC_GroupSay(botid, channel, "You did not put in a msg"); else if (IRC_IsOp(botid, channel, user)== 0) return IRC_GroupSay(botid, channel, "You are not a channel admin"); else if (iD == INVALID_PLAYER_ID) IRC_GroupSay(botid, channel,"~ Invaild Player ID"); else { GetPlayerName(playerid, name, sizeof(name)); format(main,sizeof(main),"%s [#gtg2808] as 4restored %s 's health",user,name); format(amain,sizeof(amain),"%s [#gtg2808] as restored Your health",user); IRC_GroupSay(botid, channel, main); SendPlayerMessageToPlayer(playerid,0xFB0000FF,amain); PlayerPlaySound(playerid,1057,0.0,0.0,0.0); SetPlayerHealth(playerid,100); } return 1; }
and ingame , i didn't got health - 100
Code:
<~gtg2808> !heal 0 <G-1> gtg2808 [#gtg2808] as 4restored 's health