aww yeah i got that but not work
Код:
if(pickupid == carrepairpickup1)
{
if(IsPlayerInAnyVehicle(playerid))
{
/* if(GetRepairPrice(vehicleid, fixprice) >= 1)
{
SendClientMessage(playerid, COLOR_GREY, "You don't have to repair that car!");
}else{*/
format(string, sizeof(string), "Press Y to repair car for $%i", GetRepairPrice(vehicleid, fixprice));
SendClientMessage(playerid, COLOR_GREY, string);
SetPVarInt(playerid, "fixprice", GetRepairPrice(vehicleid, fixprice));
SetPVarInt(playerid, "playersveh", vehicleid);
// }
}
}
Код:
if(PRESSED(KEY_YES))
{
new Float:x, Float:y, Float:z;
new Float:x2, Float:y2, Float:z2;
GetVehiclePos(GetPVarInt(playerid, "playersveh"), x, y, z);
if(x == 2180.6826) /*carrepairpickup1 position*/ if(y == -1911.3473) if(z == 12.5025) //2180.6826, -1911.3473, 12.5025
{
if(GetMoney(playerid) >= GetPVarInt(playerid, "fixprice"))
{
GiveMoney(playerid, -GetPVarInt(playerid, "fixprice"));
RepairVehicle(GetPVarInt(playerid, "playersveh"));
GetVehiclePos(GetPVarInt(playerid, "playersveh"), x2, y2, z2);
SetVehiclePos(GetPVarInt(playerid, "playersveh"), x2, y2, z2+1);
}
}
}
somes gotta be wrong with pvars