- 0
Putin ajutor la vw
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
FlobertRO
Salut , am si eu o mica problema.
Am facut un fel de system de garaj in diferite virtual world-uri . Atunci cand intru in garaj si dau /vpark la un vehicul, acesta se salveaza in vw 0, nu in vw-ul ales de mine.
Ceva idei ?
COMANDA VPARK :
CMD:vpark(playerid, params[])
{
new carid = GetPlayerVehicleID(playerid), Float: Pos[3], Float: Angle, string[500], szQuery[256];
Edited by FlobertROif(PlayerInfo[playerid][pAdmin] < 6) return 1;
if(!IsPlayerInAnyVehicle(playerid)) return 1;
new dbid = GetVehicleID(carid);
if(ServerVehicles[dbid][vID] == 0) return SCM(playerid, COLOR_GREY, "Acest vehicul nu face parte din baza de date.");
GetVehiclePos(carid, Pos[0], Pos[1], Pos[2]);
GetVehicleZAngle(carid, Angle);
ServerVehicles[dbid][vLocation][0] = Pos[0];
ServerVehicles[dbid][vLocation][1] = Pos[1];
ServerVehicles[dbid][vLocation][2] = Pos[2];
ServerVehicles[dbid][vAngle] = Angle;
DestroyVehicle(carid);
ServerVehicles[dbid][vSpawned] = CreateVehicle(ServerVehicles[dbid][vModel], ServerVehicles[dbid][vLocation][0], ServerVehicles[dbid][vLocation][1], ServerVehicles[dbid][vLocation][2], ServerVehicles[dbid][vAngle], ServerVehicles[dbid][vColor][0], ServerVehicles[dbid][vColor][1], -1);
ChangeVehicleColorEx(carid, ServerVehicles[dbid][vColor][0], ServerVehicles[dbid][vColor][1]);
PutPlayerInVehicleEx(playerid, carid, 0);
new plate[64];
format(plate, sizeof(plate), "F%d %d", ServerVehicles[dbid][vFaction], ServerVehicles[dbid][vSpawned]);
format(string, sizeof(string), "Pozitiile vehiculului au fost modificate cu succes (vID: %d).", carid);
SCM(playerid, COLOR_LGREEN, string);
mysql_format(SQL, szQuery, sizeof(szQuery), "UPDATE `svehicles` SET `LocationX` = '%f', `LocationY` = '%f', `LocationZ` = '%f', `Angle` = '%f' WHERE `vID` = '%d'", Pos[0], Pos[1], Pos[2], Angle, dbid);
mysql_query(SQL, szQuery);
return 1;
}
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now