Exaton Posted March 15, 2020 Report Share Posted March 15, 2020 (edited) Salut grup am si eu o problema mica/mare dar pentru mine e mare si nu inteleg ce are. Am un gamemode da la un prieten cu clan vehicles pornit de la burned si cand cumpar o masina la clan si dupa cand cumpar a 2-a masina se pune in locul primei masini si prima masina dispare dupa restart dispar ambele din Clan Vehicles si in locul unde a fost creata masina pentru clan se pune o masina depe server (Factiune) poftim codul: function insert_clan_vehicle(playerid, modelid, price) { new Float: Pos[3], Float: Angle, szQuery[256], string[128], carid = GetServerVehicles()+1, clanid = PlayerInfo[playerid][pClan]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); GetPlayerFacingAngle(playerid, Angle); ServerVehicles[carid][vSpawned] = CreateVehicle(modelid, Pos[0], Pos[1], Pos[2], Angle, 1, 1, -1); SetVehicleNumberPlate(ServerVehicles[carid][vSpawned], "NewCar"); PutPlayerInVehicleEx(playerid, ServerVehicles[carid][vSpawned], 0); ServerVehicles[carid][vID] = carid; ServerVehicles[carid][vModel] = modelid; ServerVehicles[carid][vLocation][0] = Pos[0]; ServerVehicles[carid][vLocation][1] = Pos[1]; ServerVehicles[carid][vLocation][2] = Pos[2]; ServerVehicles[carid][vAngle] = Angle; ServerVehicles[carid][vColor][0] = 1; ServerVehicles[carid][vColor][1] = 1; ServerVehicles[carid][vClan] = clanid; mysql_format(SQL, szQuery, sizeof(szQuery), "INSERT INTO `svehicles` (vID, vModel, LocationX, LocationY, LocationZ, Angle, Clan) VALUES ('%d', '%d', '%f', '%f', '%f', '%f', '%d')", carid, modelid, Pos[0], Pos[1], Pos[2], ServerVehicles[carid][vAngle], PlayerInfo[playerid][pClan]); mysql_query(SQL, szQuery); ClanInfo[clanid][clMoney] -= price; format(szQuery, sizeof(szQuery), "UPDATE `clans` SET `Money`='%d' WHERE `ID`='%d'", clan_money(clanid), clanid); mysql_tquery(SQL, szQuery, "", ""); format(string, sizeof(string), "{%s}[CLAN] %s a cumparat vehiculul %s pentru clan (-$%s, total: $%s).", ClanInfo[clanid][clColor], GetName(playerid), aVehicleNames[modelid-400], FormatNumber(price), clan_money(clanid)); SendClanMessage(clanid, string); return 1; } Edited March 15, 2020 by Exaton Quote Link to comment Share on other sites More sharing options...
Exaton Posted March 16, 2020 Author Report Share Posted March 16, 2020 Help pls Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.