23.11.2014, 15:28
Код HTML:
Code:dcmd_cure(playerid,params[]) { new id = strval(params); if(!strlen(params)) return SCM(playerid,0xFF00000,"[ Doctor] Use /cure ID"); if(!IsPlayerConnected(id)) return SCM(playerid,-1,"The player is not online"); if(jobs[playerid] != 4) return SCM(playerid,0xFFFFFF,"There are employed"); if(strval(params) == playerid) return SCM(playerid,0xFFFFFF,"You can not heal himself!"); if(IsPlayerInAnyVehicle(id)) return SCM(playerid,0xFFFFFF,"A player can be in the car!"); new Float:X, Float:Y, Float:Z; SetPlayerHealth(id,100); GetPlayerPos(playerid, X, Y, Z); if(!IsPlayerInRangeOfPoint(id, 10.0, X, Y, Z)) return SCM(playerid,-1,"The player is not close to you!"); GivePlayerMoney(playerid,1000); new str[264]; format(str, sizeof(str), "Doctor %s heal player %s!", Jmeno(playerid), Jmeno(id)); SendClientMessageToAll(-1,str); return 1; }
Then he would heal and kdyэ player will have more than 70 HP so it give the player is healthy