Need Help Please -
kevin132312 - 27.12.2016
CMD:heal(playerid, params[])
{
if(gClass[playerid] == MEDIC)
{
new Float:HP;
GetPlayerHealth(playerid, HP);
SendClientMessage(playerid, red, "USAGE: /heal [playerid]");
new string[100]; format(string, sizeof(string),"%s has healed with 25.00 HP and Recieved 3000$ For it ", PlayerName2(playerid) );
if(HP >= 75) { SetPlayerHealth(playerid, 100.0); } else { SetPlayerHealth(playerid, HP + 25.0); }
Block_CMD[playerid][9] = true;
SetTimerEx("EnableCMD",120000,false,"dd",playerid, 9);
}
else return SendClientMessage(playerid,red,"ERROR: You have to wait 2 minutes!");
GivePlayerMoney(playerid, 3000);
return 1;
}
hello bro , can you help me please , I want to create command , for medic class ability /heal <id> = heal 25 health and get 3000 money, only heal teammate and you cant heal your self
sorry for my bad english
thanks bro
Re: Need Help Please -
BiosMarcel - 27.12.2016
this is not the we script for you section
Re: Need Help Please -
StrikerZ - 27.12.2016
PHP код:
CMD:heal(playerid, params[])
{
if(gClass[playerid] == MEDIC)
{
new Float:HP;
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid, red, "USAGE: /heal [playerid]");
if(id == playerid) return SendClientMessage(playerid, red, "You can't perform it on yourself.");
GetPlayerHealth(playerid, HP);
new string[100];
format(string, sizeof(string),"%s has healed with 25.00 HP and Recieved 3000$ For it ", PlayerName2(playerid) );
If(HP >= 75)
{
SetPlayerHealth(id, 100.0);
}
else
{
SetPlayerHealth(id, HP + 25.0);
}
Block_CMD[playerid][9] = true;
SetTimerEx("EnableCMD",120000,false,"dd",playerid, 9);
}
else return SendClientMessage(playerid,red,"ERROR: You have to wait 2 minutes!");
GivePlayerMoney(playerid, 3000);
return 1;
}