31.01.2015, 01:49
Cant find any soulution yet, does anyone know, I'm sure this is the problem
pawn Код:
if(LiderKupuje[playerid] == true)
{
new Keys, ud, lr, str[128], str2[128], ime[25];
GetPlayerKeys(playerid, Keys, ud, lr); GetPlayerName(playerid, ime, sizeof(ime));
if(lr > 0)
{
Autosalon[playerid]++;
if(Autosalon[playerid] >= sizeof(OrgVozila)) Autosalon[playerid] = 0;
DestroyVehicle(IzlozbenoVozilo[playerid]);
IzlozbenoVozilo[playerid] = CreateVehicle(OrgVozila[Autosalon[playerid]][0], 2148.2092,-1166.2465,23.7537,271.1449, 1, 1, -1);
format(str, sizeof(str), "Vozilo: %s", ImenaVozila[OrgVozila[Autosalon[playerid]][0]]);
TextDrawSetString(LiderBuyingVeh0[playerid], str);
format(str2, sizeof(str2), "Cena: %d", ImenaVozila[OrgVozila[Autosalon[playerid]][1]]);
TextDrawSetString(LiderBuyingVeh1[playerid], str2);
}
else if(lr < 0)
{
Autosalon[playerid]--;
if(Autosalon[playerid] < 0) Autosalon[playerid] = sizeof(OrgVozila)-1;
DestroyVehicle(IzlozbenoVozilo[playerid]);
IzlozbenoVozilo[playerid] = CreateVehicle(OrgVozila[Autosalon[playerid]][0], 2148.2092,-1166.2465,23.7537,271.1449, 1, 1, -1);
format(str, sizeof(str), "Vozilo: %s", ImenaVozila[OrgVozila[Autosalon[playerid]][0]]);
TextDrawSetString(LiderBuyingVeh0[playerid], str);
format(str2, sizeof(str2), "Cena: %d", ImenaVozila[OrgVozila[Autosalon[playerid]][1]]);
TextDrawSetString(LiderBuyingVeh1[playerid], str2);
}
if (Keys & KEY_HANDBRAKE || Keys & KEY_JUMP )
{
DestroyVehicle(IzlozbenoVozilo[playerid]);
SCM(playerid, WHITE, "Odustali ste od kupovine vozila...");
TogglePlayerControllable(playerid, 1);
LiderKupuje[playerid] = false;
SetCameraBehindPlayer(playerid);
TextDrawHideForPlayer(playerid, LiderBuyingVeh0[playerid]);
TextDrawHideForPlayer(playerid, LiderBuyingVeh1[playerid]);
}
}