10.09.2017, 17:06
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
ur welcome
Код:
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; }*