27.08.2017, 14:55
pawn Код:
if(strcmp(cmd, "/heal", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /heal [playerid/PartOfName] [Price]");
return 1;
}
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /heal [playerid/PartOfName] [Price]");
return 1;
}
if(!IsPlayerInRangeOfPlayer(2, playerid, giveplayerid))
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not in range of that player !");
return 1;
}
if(giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_GRAD1, " You cannot heal yourself !");
return 1;
}
if(PlayerPaused[giveplayerid] == 1)
{
SendClientMessage(playerid, COLOR_GRAD1, " You cannot heal someone who's tabbed !");
return 1;
}
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
strmid(giveplayer, PlayerRPName(giveplayerid), 0, MAX_PLAYER_NAME);
strmid(sendername, PlayerRPName(playerid), 0, MAX_PLAYER_NAME);
if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
if(IsPlayerConnected(playerid))
{
new Float:tempheal;
GetPlayerHealth(giveplayerid,tempheal);
if(tempheal >= 100.0)
{
SendClientMessage(playerid, COLOR_GRAD1," That person is fully healed or that person is not injured!");
return 1;
}
SendClientMessage(giveplayerid, COLOR_GRAD1, " You have been fully healed.");
PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "* Paramedic %s has healed %s for $%d.", sendername,giveplayer,moneys);
when i do /heal (id) (price) it says : You have been fully healed.
but the player's heal not full , still same ...
rip english, sorry guys