Jump to content

//_Dragon

Members
  • Posts

    214
  • Joined

  • Last visited

Everything posted by //_Dragon

  1. لا في لوحة حبعتلك في الخاص السكريبت
  2. my database has clan_leaders the only issue is countPlayerInClan i need to replace it to get fixed
  3. i add it only in sql clan_leaders but it doesnt has any relation with it i should find his local function countPlayersInClan(clan) local q = executeSQLQuery("SELECT * FROM clan_members WHERE clan=?",clan) local q = executeSQLQuery("SELECT * FROM clan_leaders WHERE clan=?",clan) return #q end function callMeMaybe() local tbl = {} local q = executeSQLQuery("SELECT * FROM clans") for i,v in ipairs(q) do local query = executeSQLQuery("SELECT username FROM accountUsername WHERE account=?",v.owner) local clan = v.name local tag = v.tag local r = v.r local g = v.g local b = v.b local members = countPlayersInClan(clan) local leaders = countPlayersInClan(clan) table.insert(tbl,#tbl+1,{owner=query[1].username:gsub("%[.*%]", ""),name=clan,tag=tag,r=r,g=g,b=b,members=members,leaders=leaders})
  4. Hey there i want to count how many leaders are in clan but it counts only numbers of members local leaders = countPlayersInClan(clan) anybody can help me to make it works ? countLeaders in clan
  5. this is a script mod called party like a group where u can t talk to ur friend the problem is it doesnt shows the panel but it's working fine idk how i can fix it function updateParty(p) local t = {} local s = p:getSerial() local is = party[s] if is then for i,v in ipairs(getSerialsInParty(is)) do local s = v local q = executeSQLQuery("SELECT username FROM accountUsername WHERE serial=?",s) local n = q[1].username local leader = isPartyLeader(is,s) local h = getPlayerFromSerial(s) if isElement(h) then local r,g,b = getPlayerNametagColor(h) color[s] = {r,g,b} end table.insert(t,{n,leader,color[s]}) end triggerClientEvent(p,"PT:Update",p,t) end end it should works like these :=========> link : https://imge.to/i/z3NUZ debugscript problem >> https://imge.to/i/z3dXx
  6. انا عملت مود بتاع بارتي المشكلة في الكود نفسه مش عارف احله ازاي ممكن مساعدة ؟ function updateParty(p) local t = {} local s = p:getSerial() local is = party[s] if is then for i,v in ipairs(getSerialsInParty(is)) do local s = v local q = executeSQLQuery("SELECT username FROM accountUsername WHERE serial=?",s) local n = q[1].username local leader = isPartyLeader(is,s) local h = getPlayerFromSerial(s) if isElement(h) then local r,g,b = getPlayerNametagColor(h) color[s] = {r,g,b} end table.insert(t,{n,leader,color[s]}) end triggerClientEvent(p,"PT:Update",p,t) end end عايزه يبقا شغال كدا في الصورة link : https://imge.to/i/z3NUZ debugscript problem >> https://imge.to/i/z3dXx
  7. او الكود فيه مشكلة شوف انت الكود لي حطيتو و حتفهم المشكلة end في مشكلة في
  8. addEvent("FixMyVehicle", true) addEventHandler("FixMyVehicle", root, function(id) if (getElementData(source, "Money") or 0) >= tonumber(5000) then setElementData(source, "Money", getElementData(source, "Money") - 5000) local vehicle = getVehicleByID(id) if isElement(vehicle) then fixVehicle(vehicle) setVehicleEngineState(vehicle, true) if isVehicleDamageProof(vehicle) then setVehicleDamageProof(vehicle, false) end end dbExec(db, "UPDATE VehicleList SET HP = ? WHERE Account = ? AND ID = ?", 1000, getAccountName(getPlayerAccount(source)), id) updateVehicleInfo(source) exports["Notice"]:outputNotice(source,"#58FAF4Your Vehicle #00FF00has been fixed.", "success", true) outButDxChat ("[Vehicle System] #58FAF4Your Vehicle #00FF00has been fixed.", source, 255, 85, 0, true) else exports["Notice"]:outputNotice(source,"#FF0000You don't have enough money to fix the vehicle.", "error", true) outButDxChat ("[Vehicle System] #FF0000You don't have enough money to fix the vehicle.", source, 255, 85, 0, true) end end) جديدة لما تكون عاوز تصلح السيارة و هي مش موجودة معاك outButDxChat عايز احط else outButDxChat ("[Vehicle System] #FF0000Your vehicle is not spawned", source, 255, 85, 0, true) لو حطتها ، السكريبت مش بيشتغل ايه هو الغلط ؟
  9. طيب انا عايز اعمل outputchatbox لما تضغط على Engine On المحرك بيشتغل و بيجيلك في الشات [Vehicle SySTEM] Engine on و لما تضغط تاني المحرك بيطفا و بيجيلك في الشات [Vehicle SySTEM] Engine off
  10. غلط مش رادي يشتغل انا عملت كود يقدر يخليك طفي محرك السيارة و تشغل بضغطة زر المشكلة لما تضغط ، المحرك يبقا شغال ، يعني الكود مش شغال فيه مشكلة انا عايز اخلي الكود شغال يعني لما اجي اضغط على الزر المحرك بيطفا و لما اضغط تاني بيشتغل المحرك
  11. انا عملت الكود دا لما تيجي تدوس على button اسمها Engine On / Off المحرك بتاع السيارة بيطفا و لما دوس كليك عليه تاني بشتغل المحرك بس الكود دا فيه غلط علشان خرب لوحة السيارة addEvent( 'VehiclesSystem;off/onPersonalVehicle', true ) addEventHandler( 'VehiclesSystem;off/onPersonalVehicle', root, function switchEngine ( playerSource ) local theVehicle = getPedOccupiedVehicle ( playerSource ) -- Check if the player is in any vehicle and if he is the driver if theVehicle and getVehicleController ( theVehicle ) == playerSource then local state = getVehicleEngineState ( theVehicle ) setVehicleEngineState ( theVehicle, not state ) end end end ) الأصلي function turnEngineOff ( theVehicle, leftSeat, jackerPlayer ) -- if it's the driver who got out, and he was not jacked, if leftSeat == 0 and not jackerPlayer then -- turn off the engine setVehicleEngineState ( theVehicle, false ) end end -- add 'turnEngineOff' as a handler for "onPlayerExitVehicle" addEventHandler ( "onPlayerVehicleExit", getRootElement ( ), turnEngineOff )
  12. First u're newbie because you steal it , also i made it 1 year ago & 2 days ago i decide to fixe it but u steal it from my post forum . Stop clonnig other servers ( gra....) & i can prove that you steal my script CHECK the pic : http://imgur.com/IJa4lnj What is this ? hein ? also you add it in your server just yesterday that mean after i posted it in forum Anyway stop lying , go away from my forum's post
  13. you forget add function replaceskin()
  14. function replaceskin() --- i change it to replaceskin for vehicle txd = engineLoadTXD ( "buffalo.txd" ) ---file.txd engineImportTXD ( txd, 402) dff = engineLoadDFF ( "buffalo.dff", 402) -- file.dff engineReplaceModel ( dff, 402) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceskin) ---- here when the mod started the skin will be automatic changed
  15. thanks dude it's working a little problem i want add account stafff in this script because any one can do name writted in panel & name will be online i want add name account in panel then if staff connect with name account his name will be white ( online ) but other if they do same name but different account there name will be not white ( online )
  16. function giveSomeoneMoney(player, cmd, target, amount) if target then if amount then local money = getPlayerMoney(player) local targetplayer = getPlayerFromParticalName(target) local r, g, b = getPlayerNametagColor(thePlayer) ---- local r, g, b local fromHex = string.format("#%.2X%.2X%.2X", r, g, b) -- converts R, G, B to HEX value local hex = string.format("#%.2X%.2X%.2X", r, g, b) -- converts R, G, B to HEX value amount = tonumber(amount) if targetplayer then if money >= amount and amount >= 250 then givePlayerMoney(targetplayer, amount) takePlayerMoney(player, amount) outputChatBox("You Were Given from " ..fromHex.. getPlayerName(player) .. " #00FF00$"..tostring(amount).." , targetplayer, 0, 100, 0, true) outputChatBox("You Gave to " ..toHex.. getPlayerName(targetplayer) .. " #00FF00$"..tostring(amount)..", player, 0, 100, 0, true)
  17. How ? idk if will work or not
  18. I mean like ur nametag color is : Solidsnake14 i must see in chatbox you get were given 2222$ from Solidsnake14 --- ur color you gave 2222$ to Oussez--Color blue
×
×
  • Create New...