pawn Код:
for(new i = 0; i < MAX_VEHICLES; i++)
{
if(GetVehicleModel(vehicleid) == 491)
{
if(GetPlayerMoney(playerid) > 275000)
{
GivePlayerMoney(playerid, -275000);
SendClientMessageToAll(C_GREEN, string);
SendClientMessage(playerid, C_ORANGE, "SERVER: Your car was transported in front of the carshop!");
AddStaticVehicle(491, 2229.5801,58.1939,26.0340,179.0254,0,1);
dini_IntSet(fail, "CarModelID", 491);
dini_IntSet(fail, "CarID", i+1);
dini_FloatSet(fail, "CarX", 2229.5801);
dini_FloatSet(fail, "CarY", 58.1939);
dini_FloatSet(fail, "CarZ", 179.0254);
AutoInfo[vehicleid][aLocked] = 0;
}
else
{
SendClientMessage(playerid, C_RED, "SERVER: Not enough money to buy it!");
}
}
And If I buy a car, and I have more than 1 of this ^^ function with diffrent model ID's, its spamming me message: "Not enough money to buy it!" for 30 times (i have 30 of this function).