georgica Posted December 4, 2020 Share Posted December 4, 2020 if(VehFaction[vehicleid] == PlayerInfo[playerid][pMember]) { if(playerSpawnedVehicle[playerid] == 1) SetVehicleParamsForPlayer(playerVehicle[playerid], playerid, 0, 0), playerSpawnedVehicle[playerid] = 0; } else { SlapPlayer(playerid); SCMf(playerid, COLOR_GREY, "* Error: Nu faci parte din factiunea %s.", FactionName(VehFaction[vehicleid])); } } Salut, am o problema la vehicule, cand spawnez (nu tot timpul) zice ca nu fac parte din factiunea x, y, z nu conteaza. YCMD:spawncar(playerid, params[], help) { if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_WHITE, AdminOnly); new model,string[180], color1, color2; if(sscanf(params, "iii", model, color1, color2)) return SCM(playerid,COLOR_GREY, "{FFFF00}Syntaxa: {FFFFFF}/spawncar <Model> <color1> <color2>"); if(model < 400 || model > 611) return SCM(playerid,COLOR_WHITE, "Invalid car ID."); new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); new carid = CreateVehicleEx(model, X,Y,Z, 0.0, color1, color2, -1); Iter_Add(vehs, carid); Gas[carid] = 100; SetVehicleNumberPlate(carid, "AdmCar"); Carspawn[carid] = carid; new vehicles = GetVehicleModel(carid) - 400; format(string, sizeof(string), "{6f03fc}ADMIN >> {FFFFFF} %s a spawnat un %s (%d). Total vehicule spawnate: %d.",GetName(playerid),aVehicleNames[vehicles],carid, Iter_Count(vehs)); if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_WHITE, string, 2); LinkVehicleToInterior(carid, GetPlayerInterior(playerid)); SetVehicleVirtualWorld(carid, GetPlayerVirtualWorld(playerid)); PutPlayerInVehicleEx(playerid, carid, 0); return 1; } Link to comment Share on other sites More sharing options...
Brek1312 Posted December 9, 2020 Share Posted December 9, 2020 adauga dupa carspawn[carid] = carid urmatoarea chestie: VehFaction[carid] = 0; Link to comment Share on other sites More sharing options...
Kedoo Posted January 31, 2021 Share Posted January 31, 2021 Topic inactiv - T/C. Link to comment Share on other sites More sharing options...
Recommended Posts