I need help
#10

Don't forget to use GivePlayerMoney instead of SetPlayerMoney, if you're just trying to subtract that amount from their money. Using what you are using will set them always to -$3500, no matter if they have $1, or $1,000,000,000,000.

Maybe?:

pawn Код:
if(strcmp(cmd, "/heal", true) == 0)
{
    if(!IsPlayerInRangeOfPoint(playerid,5.0, 1105.5730,-1313.1779,13.2393) || !IsPlayerInRangeOfPoint(playerid,5.0, 614.4229,-1773.3818,13.8586) ||
    !IsPlayerInRangeOfPoint(playerid,5.0, 2217.0942,-1170.1138,25.3024) || !IsPlayerInRangeOfPoint(playerid,5.0, 2049.8718,-2025.0125,13.1116))
    {
    SendClientMessage(playerid, COLOR_RED, "You are not close to the places where you can buy health and armor [The Hearth on the map]");
    }
    else
    {
    SetPlayerHealth(playerid,100);
    SetPlayerArmor(playerid,50);
    GivePlayerMoney(playerid,-3500);
    SendClientMessage(playerid,COLOR_GREEN,"You buy 100 Health and 50 Armor for 3500$ !");
    }
    return 1;
}
Reply


Messages In This Thread
Removed! - by dakata994 - 19.10.2013, 21:10
Re: I need help - by DanishHaq - 19.10.2013, 21:12
Re: I need help - by CJay9209 - 19.10.2013, 21:14
Re: I need help - by dakata994 - 19.10.2013, 21:15
Re: I need help - by KingHual - 19.10.2013, 21:17
Re: I need help - by dakata994 - 19.10.2013, 21:21
Re: I need help - by dakata994 - 19.10.2013, 21:25
Re: I need help - by Patrick - 19.10.2013, 21:28
Re: I need help - by dakata994 - 19.10.2013, 21:33
Re: I need help - by TehMiles - 19.10.2013, 21:37

Forum Jump:


Users browsing this thread: 2 Guest(s)