проблемма такая что когда покупаешь хот дог то деньги снимаются и обратно приходят вот код
Код:
//=======================hotdog===============================================//
if(strcmp(cmd, "/hotdog", true) == 0 || strcmp(cmd, "/htd", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(3.0,playerid,-2037.90002441,-85.50000000,35.40000153) || PlayerToPoint(3.0,playerid,1518.69995117,-1680.69995117,13.69999981) || PlayerToPoint(3.0,playerid,-93.80000305,-1138.40002441,1.50000000) || PlayerToPoint(3.0,playerid,1805.40002441,-1882.40002441,13.69999981) || PlayerToPoint(3.0,playerid,80.90000153,-1521.30004883,4.90000010) || PlayerToPoint(3.0,playerid,-1115.1973,354.0090,14.1411)) {
SetPlayerHealth(playerid, 100);
ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,0,1,1,1,1);
PlayerPlaySound(playerid, 1055, 0.0, 0.0, 0.0);
GivePlayerMoney(playerid, -30);
GameTextForPlayer(playerid, "~r~ - 30 $", 5000, 1);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s купил хотдог, и неспеша съел его.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Здесь нельзя купить хотдог.");
return 1;
}
}
}