cstef4n Posted 1 hour ago Posted 1 hour ago (edited) salutare, Cum fac sa sterg vehiculele din clan? Quote CMD:removevehicleclan(playerid, params[]) { new clanid; if(sscanf(params, "i", clanid)) return SCM(playerid, COLOR_SERVER, "Syntax: {FFFFFF}/removevehicleclan [clanid]"); // AICI NU DESPAWNEAZA VEHICULELE, in rest, le sterge din database; for(new idz = 0; idz < MAX_CARS; idz ++) { if(CarClan[idz][vClanID] == clanid) { CarClan[idz][vSpawned] = 0; DestroyVehicle(CarClan[idz][vSpawned]); } } new string[128]; mysql_format(SQL, string, sizeof(string), "DELETE FROM clan_vehicles WHERE ClanID=%d",clanid); mysql_tquery(SQL, string, "", ""); return 1; } Edited 1 hour ago by cstef4n
0 sunkie Posted 1 hour ago Posted 1 hour ago (edited) salut, trebuie să apelezi funcția DestroyVehicle înainte de a reseta variabila care păstrează id-ul mașinii de clan. DestroyVehicle(CarClan[idz][vSpawned]); CarClan[idz][vSpawned] = 0; recomand sa mai pui si niste verificari extra (de ex daca vehiculul exista) si sa pui INVALID_VEHICLE_ID in loc de 0. Edited 1 hour ago by sunkie
Question
cstef4n
salutare,
Cum fac sa sterg vehiculele din clan?
Edited by cstef4n1 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