19.12.2010, 09:13
Can you help me with my /heal cmd?
I wan't it to do this, when e.x a player has 10hp and another player heals he gets 90 = equal to the hp he healed
Код:
dcmd_heal(playerid, params[]) { if (strlen(params)) { id = strval(params[0]); if (IsPlayerConnected(id)) { if(Medic[playerid] == 1 || IsPlayerInVehicle(playerid, 416)) { SetPlayerHealth(id,100); new pName[24]; new string[265]; GetPlayerName(playerid,"pName",sizeof(pName)); format(string,sizeof(string),"MEDIC:You got healed by Medic %s",pName); SendClientMessage(id,0x00FF00AA,string); } else { SendClientMessage(playerid,0x00FF00AA,"SERVER:You dont have permission to this command!,or yo're ont in an Ambulance!"); } } else { SendClientMessage(playerid, 0xFF0000AA, "Player not found"); } } else { SendClientMessage(playerid, 0xFF0000AA, "SERVER:Usage /heal [ID]"); } return 1;