Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(new i; i < sizeof(VInfo); i++)
- {
- new query[1204], str[128];
- if(PI[playerid][Auto] != -1) return SCM(playerid, TOMATO, "[RPF] {FFFFFF}Vec imate auto.");
- new poz = random(sizeof(PozicijeAutomobila));
- VInfo[i][Model] = AutoBiraModel[playerid];
- VInfo[i][PozX] = PozicijeAutomobila[poz][0];
- VInfo[i][PozY] = PozicijeAutomobila[poz][1];
- VInfo[i][PozZ] = PozicijeAutomobila[poz][2];
- VInfo[i][PozA] = PozicijeAutomobila[poz][3];
- VInfo[i][VW] = 0;
- VInfo[i][Int] = 0;
- VInfo[i][Boja1] = 0;
- VInfo[i][Boja2] = 0;
- strmid(VInfo[i][Vlasnik], ImeIgraca(playerid), 0, strlen(ImeIgraca(playerid)), 255);
- VInfo[i][Cena] = AutomobilCena[playerid];
- VInfo[i][Zakljucan] = 0;
- VInfo[i][Droga] = 0;
- VInfo[i][Mats] = 0;
- VInfo[i][Oruzje1] = -1;
- VInfo[i][Oruzje2] = -1;
- VInfo[i][Oruzje3] = -1;
- VInfo[i][Municija1] = -1;
- VInfo[i][Municija2] = -1;
- VInfo[i][Municija3] = -1;
- PI[playerid][Auto] = i;
- format(str, sizeof(str), ""COL_YELLOW"[SERVER]: "COL_WHITE"Cestitamo, kupili ste vozilo "COL_YELLOW"%s "COL_WHITE"po ceni od "COL_YELLOW"$%d.", AutomobilCena[playerid]);
- SCM(playerid, WHITE, str);
- SCM(playerid, WHITE, ""COL_YELLOW"[SERVER]: "COL_WHITE"Dostupne komande vaseg auta mozete videti na "COL_YELLOW"/v.");
- VInfo[i][ownedvehicle] = CreateVehicle_H(VInfo[i][Model], VInfo[i][PozX], VInfo[i][PozY], VInfo[i][PozZ], VInfo[i][PozA], VInfo[i][Boja1], VInfo[i][Boja2], 300000);
- SetVehicleToRespawn(VInfo[i][ownedvehicle]);
- SetPlayerCheckpoint(playerid, VInfo[i][PozX], VInfo[i][PozY], VInfo[i][PozZ], 10.0);
- format(query, sizeof(query), "UPDATE `Igraci` SET `Auto` = '%d' WHERE `Ime` = '%s'", PI[playerid][Auto], ImeIgraca(playerid));
- mysql_function_query(konekt, query, true, "OnQueryFinish", "ii", THREAD_OSTALO, playerid);
- format(query, sizeof(query), "INSERT INTO `Automobili` (`ID`, `Model`, `PozX`, `PozY`, `PozZ`, `PozA`, `VW`, `Int`, `Zakljucan`, `Boja1`, `Boja2`, \
- `Vlasnik`, `Cena`, `ImaVlasnika`, `Droga`, `Oruzje1`, `Oruzje2`, `Oruzje3`, `Municija1`, `Municija2`, `Municija3`) VALUES");
- format(query, sizeof(query), "%s ('%d', '%d', '%f', '%f', '%f', '%f', '0', '0', '0', '0', '0', '%s', '%d', '1', '0', '-1', '-1', '-1', '-1', '-1', '-1')",
- query, i, VInfo[i][Model], VInfo[i][PozX], VInfo[i][PozY], VInfo[i][PozZ], VInfo[i][PozA], VInfo[i][Vlasnik], VInfo[i][Cena]);
- mysql_function_query(konekt, query, true, "OnQueryFinish", "i", THREAD_OSTALO);
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement