Healup
#2

sscanf to check if he put an victim id should be ontop ur making it get the victim location while victim which is player id is 0 so that's how it should work
Код:
CMD:healup(playerid,*params[])
{
****new*victim,*health;
	if(sscanf(params,*"ud",*victim))*return*SendClientMessage(playerid,*COLOR_GREY,*"/healup*(id)");
	if(PlayerInfo[playerid][pFaction]*!=*3)*return*SCM(playerid,*COLOR_LIGHTRED,*"You*are*not*a*police*officer.");
****if(victim*==*INVALID_PLAYER_ID)*return*SendClientMessage(playerid,*COLOR_LIGHTRED,*"That*player*is*not*connected.");
****new*Float:X,*Float:Y,*Float:Z;
****GetPlayerPos(victim,*X,*Y,*Z);
****if*(GetDistanceBetweenPlayers(playerid,victim)*<*5)
****{
****	GetPlayerHealth(victim,*health);
****	if*(health*<*40)
*****	SetPlayerHealth(victim,*60);
****}
****else*return*SCM(playerid,*COLOR_LIGHTRED,*"You're*not*close*to*that*player.");
****return*1;
}*
ur welcome
Reply


Messages In This Thread
Healup - by Cubie - 10.09.2017, 16:22
Re: Healup - by silverms - 10.09.2017, 17:06
Re: Healup - by silverms - 10.09.2017, 17:08
Re: Healup - by FuNkYTheGreat - 10.09.2017, 17:16
Re: Healup - by Cubie - 10.09.2017, 17:28

Forum Jump:


Users browsing this thread: 2 Guest(s)