- 0
Vinde masina.
-
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
Seven
Problema intalnita (descriere): Salut, am testat ds si am cumparat o masina dar cand doresc sa o cumpar imi zice "Trebuie sa fi in masina ca sa o poti vinde! ".. desi sunt in masina pe care am cumparat-o
Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul:
if(strcmp(cmd, "/vindemasina", true) == 0) { if(IsPlayerConnected(playerid)) { if(GetPlayerVehicleID(playerid) == PlayerData[playerid][pPcarkey]+PreVehicle) { GetPlayerName(playerid, sendername, sizeof(sendername)); new ownvehkey; if(GetPlayerVehicleID(playerid) == PlayerData[playerid][pPcarkey]+PreVehicle) { ownvehkey = PlayerData[playerid][pPcarkey]; } else { return 1; } if(strcmp(sendername, CarData[ownvehkey][cOwner], true) == 0) { new carsellprice = CarData[ownvehkey][cValue] / 4 * 3; CarData[ownvehkey][cOwned] = 0; CarData[ownvehkey][cLockk] = 0; strmid(CarData[ownvehkey][cOwner], "Dealership", 0, strlen("Dealership"), 999); GivePlayerCash(playerid,carsellprice); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~Ti-ai vandut masina personala cu: ~n~~g~$%d", carsellprice); GameTextForPlayer(playerid, string, 10000, 3); if(GetPlayerVehicleID(playerid) == PlayerData[playerid][pPcarkey]+PreVehicle) { PlayerData[playerid][pPcarkey] = 999; format(string, sizeof(string), "UPDATE players SET Car='%d' WHERE id=%d", PlayerData[playerid][pPcarkey], PlayerData[playerid][pSQLID]); mysql_query(string); } TogglePlayerControllable(playerid, 1); CarData[ownvehkey][cLocationx] = CarData[ownvehkey][cSaLocationx]; CarData[ownvehkey][cLocationy] = CarData[ownvehkey][cSaLocationy]; CarData[ownvehkey][cLocationz] = CarData[ownvehkey][cSaLocationz]; CarData[ownvehkey][cAngle] = CarData[ownvehkey][cSaAngle]; DestroyVehicle(ownvehkey+PreVehicle); CreateVehicle(CarData[ownvehkey][cModel],CarData[ownvehkey][cLocationx],CarData[ownvehkey][cLocationy],CarData[ownvehkey][cLocationz]+1.0,CarData[ownvehkey][cAngle],CarData[ownvehkey][cColorOne],CarData[ownvehkey][cColorTwo],60000); format(string, sizeof(string), "UPDATE cars SET Locationx='%f' WHERE id=%d", CarData[ownvehkey][cLocationx], ownvehkey); mysql_query(string); format(string, sizeof(string), "UPDATE cars SET Locationy='%f' WHERE id=%d", CarData[ownvehkey][cLocationy], ownvehkey); mysql_query(string); format(string, sizeof(string), "UPDATE cars SET Locationz='%f' WHERE id=%d", CarData[ownvehkey][cLocationz], ownvehkey); mysql_query(string); format(string, sizeof(string), "UPDATE cars SET Angle='%f' WHERE id=%d", CarData[ownvehkey][cAngle], ownvehkey); mysql_query(string); format(string, sizeof(string), "UPDATE cars SET Owned='%d' WHERE id=%d", CarData[ownvehkey][cOwned], ownvehkey); mysql_query(string); format(string, sizeof(string), "UPDATE cars SET Owner='%s' WHERE id=%d", CarData[ownvehkey][cOwner], ownvehkey); mysql_query(string); format(string, sizeof(string), "UPDATE cars SET Lockk='%d' WHERE id=%d", CarData[ownvehkey][cLockk], ownvehkey); mysql_query(string); new year,month,day,hour,minute,second; getdate(year, month, day); gettime(hour,minute,second); format(string, sizeof(string), "AdmCmd: %s a vandut id %d in %d/%d/%d ora %d-%d-%d",PlayerData[playerid][pNume],ownvehkey,month,day,year,hour,minute,second); PropertyLog(string); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "Trebuie sa fi in masina ca sa o poti vinde! "); return 1; } } return 1; }Imagini / Video (optional):
Edited by SevenAti incercat sa rezolvati singur?: Nu ma prea pricep..
3 answers to this question
Recommended Posts