Jump to content

Tarek1

Members
  • Posts

    95
  • Joined

  • Last visited

Everything posted by Tarek1

  1. انتا كدا خليت القاتل و المقتول = attacker
  2. دا كدا تمام لما واحد من تيم شرطه يقتل واحد عليه اكثر من 3 ستار يقوم بنقل الاعب المقتول الي مكان معين addEventHandler("onPlayerWasted",getRootElement(),function(attacker) local level = getPlayerWantedLevel ( thePlayer ) if ( level > 3 ) then if ( attacker ) and ( attacker ~= source ) and ( getPlayerTeam(attacker) ) and ( getTeamName(getPlayerTeam(attacker)) == "شرطي" ) then setElementPosition ( source,x,y,z ) end end end ) ؟
  3. طب هوا فيه code يجيب الاعب المقتول ؟
  4. فكره الاكواد لو لاعب من تيم الشرطه قام بقتل لاعب لديه اكثر من 4 ستار ينتقل هذا الاعب الي السجن
  5. نفس المشكله المشكله هنا :outputChatBox("("..ctr..") "..string.gsub(getPlayerName(player), "#%x%x%x%x%x%x", "")..": #FFFFFF"..table.concat({...}, " "), v, r, g, b, true)
  6. al sevrer side ملهوش لازمه Binds bs
  7. if plang[getElementData(player, "Country")] then
  8. Error : Line 7:attempt to index global 'plang' ( anil value)
  9. addCommandHandler("LangChat", function (thePlayer, cn, ...) if isPlayerMuted(thePlayer) or isGuestAccount(getPlayerAccount(thePlayer)) then return end if isTimer(spam[thePlayer]) then exports.URGMessages:sendClientMessage("Anti-spam: please refrain from spamming the chats!",thePlayer, 255, 0, 0) return end if plang[getElementData(thePlayer, "Country")] then ctr = plang[getElementData(thePlayer, "Country")] isclg = true else ctr = getElementData(thePlayer, "Country") isclg = false end r, g, b = getTeamColor(getPlayerTeam(thePlayer)) spam[thePlayer] = setTimer(function () end, 1000, 1) for k, v in ipairs(getElementsByType("player")) do --- getElementData(v, "nonEnglishChat")) if(ifnot(isclg, plang[getElementData(v, "Country")], getElementData(v, "Country")) == ctr ) then outputChatBox("("..ctr..") "..string.gsub(getPlayerName(thePlayer), "#%x%x%x%x%x%x", "")..": #FFFFFF"..table.concat({...}, " "), v, r, g, b, true) end end outputServerLog("LANGCHAT: ("..ctr..") "..getPlayerName(thePlayer)..": "..table.concat({...}, " ")) logThis("Lang Chat", "("..ctr..") "..getPlayerName(thePlayer)..": "..table.concat({...}, " ")) end) function ifnot(a, b, c) if a then return b else return c end end plang = { ["Portugal"] = "Portuguese", ["Brazil"] = "Portuguese", ["Slovenia"] = "Ex-Yu", ["Serbia"] = "Ex-Yu", ["Croatia"] = "Ex-Yu", ["Macedonia"] = "Ex-Yu", } addEventHandler("onPlayerJoin", getRootElement(), function () bindKey(source, "5", "down", "chatbox", "LangChat") dap = source fetchRemote("http://162.250.144.215/json/"..getPlayerIP(dap), countryCheck, "", false, dap) end) function countryCheck(resp, erno, dap) if resp ~= "ERROR" then if(fromJSON(resp)["query"] == "127.0.0.1") then pip = "Portugal" else pip = fromJSON(resp)["country"] end setElementData(dap, "Country", pip) setElementData(dap, "CC", string.lower(fromJSON(resp)["countryCode"] or "zz")) if fileExists(":admin/client/images/flags/"..getElementData(dap, "CC")..".png") then path = ":admin/client/images/flags/"..getElementData(dap, "CC")..".png" else path = ":admin/client/images/flags/zz.png" end setElementData(dap,"Pic",path) end end addCommandHandler("LangChat", function (thePlayer, cn, ...) if isPlayerMuted(thePlayer) or isGuestAccount(getPlayerAccount(thePlayer)) then return end if isTimer(spam[thePlayer]) then exports.URGMessages:sendClientMessage("Anti-spam: please refrain from spamming the chats!",thePlayer, 255, 0, 0) return end if plang[getElementData(thePlayer, "Country")] then ctr = plang[getElementData(thePlayer, "Country")] isclg = true else ctr = getElementData(thePlayer, "Country") isclg = false end r, g, b = getTeamColor(getPlayerTeam(thePlayer)) spam[thePlayer] = setTimer(function () end, 1000, 1) for k, v in ipairs(getElementsByType("player")) do --- getElementData(v, "nonEnglishChat")) if(ifnot(isclg, plang[getElementData(v, "Country")], getElementData(v, "Country")) == ctr ) then outputChatBox("("..ctr..") "..string.gsub(getPlayerName(thePlayer), "#%x%x%x%x%x%x", "")..": #FFFFFF"..table.concat({...}, " "), v, r, g, b, true) end end outputServerLog("LANGCHAT: ("..ctr..") "..getPlayerName(thePlayer)..": "..table.concat({...}, " ")) logThis("Lang Chat", "("..ctr..") "..getPlayerName(thePlayer)..": "..table.concat({...}, " ")) end) function ifnot(a, b, c) if a then return b else return c end end plang = { ["Portugal"] = "Portuguese", ["Brazil"] = "Portuguese", ["Slovenia"] = "Ex-Yu", ["Serbia"] = "Ex-Yu", ["Croatia"] = "Ex-Yu", ["Macedonia"] = "Ex-Yu", } addEventHandler("onPlayerJoin", getRootElement(), function () bindKey(source, "5", "down", "chatbox", "LangChat") dap = source fetchRemote("http://162.250.144.215/json/"..getPlayerIP(dap), countryCheck, "", false, dap) end) function countryCheck(resp, erno, dap) if resp ~= "ERROR" then if(fromJSON(resp)["query"] == "127.0.0.1") then pip = "Portugal" else pip = fromJSON(resp)["country"] end setElementData(dap, "Country", pip) setElementData(dap, "CC", string.lower(fromJSON(resp)["countryCode"] or "zz")) if fileExists(":admin/client/images/flags/"..getElementData(dap, "CC")..".png") then path = ":admin/client/images/flags/"..getElementData(dap, "CC")..".png" else path = ":admin/client/images/flags/zz.png" end setElementData(dap,"Pic",path) end end
  10. --Error attempt to concatenate global 'ctr' ( a bollean value ) outputChatBox("("..ctr..") "..string.gsub(getPlayerName(thePlayer), "#%x%x%x%x%x%x", "")..": #FFFFFF"..table.concat({...}, " "), v, r, g, b, true)
  11. هل يوجد كود يجعلني استطيع كتابه الاعداد موجب فقط في الميمو ؟؟ Window = guiCreateWindow(0.3664,0.2764,0.3508,0.3477,"GUI Window",true) guiCreateMemo(17,79,414,246,"",false,Window)
  12. اتا عدلت ال post الوقت فيه ال server client
  13. --Client Side ["events"] = { function () if not rendered then local evGrid = guiCreateGridList(0.42, 0.28, 0.16, 0.24, true) guiGridListAddColumn(evGrid, "Name:", 0.9) for k, v in pairs(events) do local r = guiGridListAddRow(evGrid,v[1]) end local evStop = guiCreateButton(0.51, 0.70, 0.08, 0.04, "Stop Event", true) local evStart = guiCreateButton(0.42, 0.70, 0.08, 0.04, "Start event", true) local evJoin = guiCreateButton(0.42, 0.66, 0.08, 0.04, "Join event", true) local evLeave = guiCreateButton(0.51, 0.66, 0.08, 0.04, "Leave Event", true) addEventHandler("onClientGUIClick", evJoin, function () if guiGridListGetSelectedItem(evGrid) >= 0 then local r = guiGridListGetSelectedItem(evGrid) triggerServerEvent("onHit",localPlayer,guiGridListGetItemText(evGrid, r, 1),"JoinEvent") else exports.URGMessages:sendClientMessage("Events: Please select an event",255,0,0) end end) --Server side function enterWarZone(p) if WarZoneStatus == true and not AllowedToEnter[getElementData(p,"Job")] then exports.URGMessages:sendClientMessage("Events : Only Government/Terrorists/Gangster/Police can join warzone",thePlayer,255,0,0) return end if not (WarZoneStatus) then exports.URGMessages:sendClientMessage("Events : War Zone Not Started ",p,255,0,0) return end if WarZoneStatus == true and isTimer(WarZoneTime) then local xx,yy,zz = getElementPosition(p) setElementData(p,"JoinedEventPos",{xx,yy,zz}) local x, y, z = unpack(spawn[getElementData(p,"Job")][math.random(#spawn[getElementData(p,"Job")])]) setElementData(p,"inWZ",true) setElementPosition(p, x, y, z) setElementDimension(p,66) end end addEvent("enterWarZone",true) addEventHandler("enterWarZone",root,enterWarZone)
  14. triggerServerEvent("onHit",localPlayer,guiGridListGetItemText(evGrid, r, 1),"JoinEvent")
  15. function enterWarZone(p) if WarZoneStatus == true and not AllowedToEnter[getElementData(p,"Job")] then exports.URGMessages:sendClientMessage("Events : Only Police Criminals can enter",thePlayer,255,0,0) return end if not (WarZoneStatus) then exports.URGMessages:sendClientMessage("Events : War Zone Not Started ",p,255,0,0) return end if WarZoneStatus == true and isTimer(WarZoneTime) then local xx,yy,zz = getElementPosition(p) setElementData(p,"JoinedEventPos",{xx,yy,zz}) local x, y, z = unpack(spawn[getElementData(p,"Job")][math.random(#spawn[getElementData(p,"Job")])]) setElementData(p,"inWZ",true) setElementPosition(p, x, y, z) setElementDimension(p,66) end end addEvent("onHit",true) addEventHandler("onHit",getRootElement(),enterWarZone)
  16. if WarZoneStatus == true and not AllowedToEnter[getElementData(p,"Job")] then exports.URGMessages:sendClientMessage("Events : Only Police Criminals can enter",thePlayer,255,0,0) return end
  17. Error : Bad argument @ 'getElementData' [ Expected element at argument 1 , got string ' warzone ' ] --Server side function enterWarZone(p) if WarZoneStatus == true and not AllowedToEnter[getElementData(p,"Job")] then exports.URGMessages:sendClientMessage("Events : Only Police Criminals can enter",thePlayer,255,0,0) return end if not (WarZoneStatus) then exports.URGMessages:sendClientMessage("Events : War Zone Not Started ",p,255,0,0) return end if WarZoneStatus == true and isTimer(WarZoneTime) then local xx,yy,zz = getElementPosition(p) setElementData(p,"JoinedEventPos",{xx,yy,zz}) local x, y, z = unpack(spawn[getElementData(p,"Job")][math.random(#spawn[getElementData(p,"Job")])]) setElementData(p,"inWZ",true) setElementPosition(p, x, y, z) setElementDimension(p,66) end end
  18. اكيد حولت لول انا مش هعمل ال topic دا تسالي
  19. كود لما الاعب يكون عنده 1 ستار او اكثر يقوم بوضع صوره فوق الاعب واذا قام هذا الاعب بالتصويب اتجاه لاعب من تيم بوليس تتغير هذه الصوره الي صوره اخري اخر ما توصلت له من اكواد من علي الويكي dxDrawImage() getPlayerTeam() == "Team" if isPedAiming(thePlayer) then getPlayerWantedLevel ( thePlayer)
  20. انا عايز اعملها في السرفر سايد
  21. --Server Side function pedLoad ( name ) myPed = createPed ( 120, 5540.6654, 1020.55122, 1240.545 ) triggerClientEvent ("onDamange",getRootElement()) end addEventHandler ( "onResourceStart", getResourceRootElement(), pedLoad ) --Client Event function test () cancelEvent() end addEventHandler("onClientPedDamage",myPed,test) addEvent("onDamage",true) addEventHandler("onDamage",getRootElement(),test)
×
×
  • Create New...