Jump to content

Walid

Members
  • Posts

    1,491
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Walid

  1. Walid

    Country chat

    local countryCode = getPlayerCountry(player) if countryCode then if countryCode == "DE" then -- Your code end end
  2. Walid

    Country chat

    the whole resource based on getPlayerIp() as i can see here function getPlayerCountry ( player ) return getIpCountry ( getPlayerIP ( player ) ) end function getIpCountry ( ip ) local ip_group = tonumber ( gettok ( ip, 1, 46 ) ) local ip_code = ( gettok ( ip, 1, 46 ) * 16777216 ) + ( gettok ( ip, 2, 46 ) * 65536 ) + ( gettok ( ip, 3, 46 ) * 256 ) + ( gettok ( ip, 4, 46 ) ) if ( #aCountries == 0 ) then loadIPGroups () end if ( not aCountries[ip_group] ) then aCountries[ip_group] = {} end for id, group in ipairs ( aCountries[ip_group] ) do if ( ( group.rstart <= ip_code ) and ( ip_code <= group.rend ) ) then return group.rcountry end end return false end
  3. Walid

    Help guys :/

    Man many things wrong in your code. more than that as i told you you can't get some one else dx status. Anyways try this Client : addEventHandler( "onClientResourceStart", getRootElement( ), function() spawnScreenMenu = guiCreateWindow(374, 93, 425, 415, "", false) guiSetVisible(spawnScreenMenu, false) guiWindowSetSizable(spawnScreenMenu, false) guiSetProperty(spawnScreenMenu, "CaptionColour", "FFE2AC2A") przycisk = guiCreateButton(10, 385, 50, 20, "Close", false, spawnScreenMenu) guiSetFont(przycisk, "default-bold-small") owner = guiCreateLabel(305, 385, 100, 25, "by Chudy ©", false, spawnScreenMenu) guiSetFont(owner, "clear-normal") guiWindowSetMovable ( spawnScreenMenu, true ) guiWindowSetSizable ( spawnScreenMenu, false ) spawnScreenGridList = guiCreateGridList(10, 25, 405, 355, false, spawnScreenMenu) guiGridListSetSelectionMode ( spawnScreenGridList, 2 ) guiGridListAddColumn ( spawnScreenGridList, "Name", 0.5 ) guiGridListAddColumn ( spawnScreenGridList, "Settings", 0.5 ) end ) addEvent("openWindow", true) addEventHandler("openWindow", root, function(player) local info = dxGetStatus( ) guiGridListClear (spawnScreenGridList) guiSetVisible ( spawnScreenMenu, not guiGetVisible ( spawnScreenMenu ) ) showCursor ( guiGetVisible ( spawnScreenMenu ) ) guiSetInputEnabled ( guiGetVisible ( spawnScreenMenu ) ) guiSetText(spawnScreenMenu,getPlayerName(player)) for k, v in ipairs( info ) do local row = guiGridListAddRow ( spawnScreenGridList ) guiGridListSetItemText ( spawnScreenGridList, row, 1, k, false, false ) guiGridListSetItemText ( spawnScreenGridList, row, 2,tostring( v ), false, false ) end end) addEventHandler( "onClientGUIClick", root, function () if source == przycisk then guiSetVisible ( spawnScreenMenu, false ) showCursor (false ) guiSetInputEnabled ( true ) end end) * Server side: function komenda(thePlayer, cmd, theTarget) if isElement(thePlayer) then if theTarget then local pTarget = findPlayer(theTarget) if (isElement(pTarget)) then triggerClientEvent(thePlayer,"openWindow",thePlayer,pTarget) else outputChatBox("No player matches with "..theTarget, thePlayer, 255, 0, 0) end else outputChatBox("Syntax: /checkvideo ", thePlayer, 255, 100, 0, true) end end end addCommandHandler("cvideo",komenda) function findPlayer( player ) if ( player and type( player ) == "string" ) then local playerElement = getPlayerFromName( player ) if ( playerElement ) then return playerElement end local playersCounted = 0 local player = string.lower(player) local spl = split( player, string.byte( "[" ) ) if ( spl ) then player = table.concat( spl, ";" ) end for k, v in pairs( getElementsByType( "player" ) ) do local name = string.lower( getPlayerName( v ) ) local spl = split( name, string.byte( "[" ) ) if ( spl ) then name = table.concat( spl, ";" ) end if ( string.find( name, player ) ) then playerElement = v playersCounted = playersCounted + 1 end end if ( playerElement and playersCounted == 1 ) then return playerElement end return false else return false end end
  4. Walid

    Help Markers

    its allowedVehicles not AllowedVehicles
  5. Walid

    Help Markers

    lol many things wrong i think you need to learn LUA language. Ayways try this local TimeTable = {} local waitTime = 3000 -- 3 seconds local infMarkers = { {2011.6, 1543.4, 10.5}, -- Marker 1 } for i , v in pairs (infMarkers) do infernusMarker = createMarker ( v[1], v[2], v[3], "cylinder", 4, 255, 255, 0, 170 ) addEventHandler( "onMarkerHit", infernusMarker, allowedVehicles ) end function allowedVehicles( hitElement, matchingDimension ) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then if isPedInVehicle ( hitElement ) then local vehicle = getPedOccupiedVehicle ( hitElement ) if vehicle then local model = getElementModel(vehicle) if tonumber(model) == 411 then TimeTable[hitElement] = setTimer(GMinfernus, waitTime, 1, hitElement) end end end end end function GMinfernus (player) if isElement (player) then if not isElementWithinMarker ( player, infernusMarker) then return end givePlayerMoney(player, 5000) end end
  6. Walid

    Help guys :/

    man i told you can't get the dx status of an other player . anyways if you want to see his name just try this : -- Server side setTimer( function() triggerClientEvent(thePlayer,"openWindow",resourceRoot,data_table,pTarget) end,1000,1 ) -- Client side addEvent("openWindow", true) addEventHandler("openWindow", resourceRoot, function(info,player) guiGridListClear (spawnScreenGridList) guiSetVisible ( spawnScreenMenu, not guiGetVisible ( spawnScreenMenu ) ) showCursor ( guiGetVisible ( spawnScreenMenu ) ) guiSetInputEnabled ( guiGetVisible ( spawnScreenMenu ) ) guiSetText(spawnScreenMenu,getPlayerName(player)) for k, v in ipairs( info ) do local row = guiGridListAddRow ( spawnScreenGridList ) guiGridListSetItemText ( spawnScreenGridList, row, 2,tostring(v[2]), false, false ) guiGridListSetItemText ( spawnScreenGridList, row, 1, tostring(v[1]), false, false ) end end)
  7. Walid

    Help Markers

    post your code here
  8. Walid

    Help guys :/

    i'm pretty sure that there is somethig wrong in your code , post full code here (server;client) side.
  9. Walid

    Help guys :/

    as i can see it's the same dx status.
  10. Walid

    Help Markers

    in this case you need to use table example : local alloWedVehicel = { [411] = true, -- infernus [522]= true, -- NRG} -- then put this inside the function local model = getElementModel(vehicle) if alloWedVehicel[model] then -- Your code end
  11. Walid

    Help guys :/

    post screen shot here and as i told you can't. only your dx status.
  12. Walid

    Help guys :/

    As far as i know you can't get the dx Status of an other player.
  13. Walid

    Help Markers

    You need to use setTimer . Example: local TimeTable = {} local waitTime = 3000 -- 3 secods -- inside the function TimeTable[hitElement] = setTimer(GM, waitTime, 1, hitElement) function GM (player) if isElement (player) then if not isElementWithinMarker ( player, theMarker) then return end givePlayerMoney(player, amount here) end end
  14. Walid

    Help guys :/

    ??? What are you trying to do
  15. Walid

    Help guys :/

    post full code here
  16. Walid

    Help Markers

    you need to create a table with all marker then check the vehicle model onMarkerHit. Example local Markers = { {x,y,z}, -- Marker 1 {x,y,z} -- marker 2 } for i , v in pairs (Markers) do local theMarker = createMarker ( v[1], v[2], v[3], "cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler( "onMarkerHit", theMarker, allowedVehicle ) end function allowedVehicle( hitElement, matchingDimension ) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then if isPedInVehicle ( hitElement ) then local vehicle = getPedOccupiedVehicle ( hitElement ) if vehicle then local model = getElementModel(vehicle) if tonumber(model) == 411 then -- Your code here end end end end end
  17. Try it without getElementData addEventHandler("onMarkerHit", marker, function ( hitElement, matchingDimension ) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then triggerClientEvent(hitElement,"ShowGui",hitElement) end end )
  18. Try this one function Zheadhit (attacker, weapon, bodypart) if (attacker and getElementType(attacker) == "player" and attacker ~= source) then if (getElementData (source, "zombie") == true) then local health = getElementHealth(source) setElementHealth(source,tonumber(health) - 25) setPedHeadless (source, false ) end end end addEventHandler ( "onClientPedDamage", getRootElement(), Zheadhit )
  19. Fixed the whole code * Client side GUIEditor = { button = {}, window = {}, label = {}, memo = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(242, 216, 1224, 670, "DjPanel By Matevsz", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(22, 39, 360, 32, "Wlacz dym", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(23, 93, 359, 34, "Wylacz dym", false, GUIEditor.window[1]) GUIEditor.memo[1] = guiCreateMemo(23, 179, 359, 32, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(81, 159, 253, 15, "Wpisz tekst, ktory bedzie pokazany na scianie", false, GUIEditor.window[1]) GUIEditor.browser[1] = guiCreateBrowser(396, 39, 810, 609, "", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(13, 624, 108, 34, "Zamknij", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(91, 228, 222, 29, "Pokaz tekst", false, GUIEditor.window[1]) local theBrowser = guiGetBrowser(GUIEditor.browser[1]) end ) function showGui() guiSetVisible(GUIEditor.window[1], true) showCursor(true) end addEvent("ShowGui", true) addEventHandler("ShowGui",root,showGui) addEventHandler("onClientBrowserCreated", theBrowser, function() loadBrowserURL(source, "https://www.youtube.com") end ) function WlaczDym() if source == GUIEditor.button[1] then dym = createObject (2780, 489.29998779297, -13.89999961853, 994.20001220703, 0, 0, 0) elseif source == GUIEditor.button[2] then if isElement(dym) then destroyElement(dym) end elseif source == GUIEditor.button[3] then guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end addEventHandler("onClientGUIClick", root, WlaczDym) addEvent("LogOutSetVisible", true) addEventHandler("LogOutSetVisible", root, function() if guiGetVisible(GUIEditor.window[1]) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end ) * Server side local marker = createMarker (487.599609375, -0.900390625, 1001.4000244141, "cylinder", 0.60000002) local stoldj = createObject (14391, 487.7001953125, -2.7001953125, 1002.299987793, 0, 0, 90) local marker2 = createMarker (493.39999389648, -24.799999237061, 1001.299987793, "arrow", 1.20000004, 235, 227, 19, 255) local marker3 = createMarker (1836.8000488281, -1682.5, 13.89999961853, "arrow", 1.20000004, 235, 227, 19, 255) local glosnik1 = createObject (2232, 484.29998779297, -5.6999998092651, 1001.700012207, 0, 0, 0) local glosnik2 = createObject (2232, 490.20001220703, -5.5999999046326, 1001.700012207, 0, 0, 0) local glosnik3 = createObject (2232, 493.29998779297, -13.89999961853, 1002, 0, 0, 272) local tancerka1 = createPed (90, 479.60000610352, -8.8999996185303, 1002.4000244141, 246.001373) local tancerka2 = createPed (90, 479.5, -4.3000001907349, 1003.9000244141, 214.001373) local barierka1 = createObject (2773, 1836, -1681, 13, 0, 0, 90) local barierka2 = createObject (2773, 1833.4000244141, -1681, 13.10000038147, 2, 0, 90) local barierka3 = createObject (2773, 1836.0999755859, -1684, 12.89999961853, 2, 0, 90) local barierka4 = createObject (2773, 1833.4000244141, -1684, 13, 1.99951171875, 0, 90) local blip = createBlip (1837.1999511719, -1682.5, 14.199999809265, 48, 2, 255, 0, 0, 255, 0) addEventHandler("onResourceStart", resourceRoot, function() tancerka1 = createPed (90, 479.60000610352, -8.8999996185303, 1002.4000244141, 246.001373) tancerka2 = createPed (90, 479.5, -4.3000001907349, 1003.9000244141, 214.001373) setTimer (AnimacjaTancerek, 1000, 0) for i, player in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("DJ")) then setElementData(player, "Show_GUI", true) else setElementData(player, "Show_GUI", nil) end end end ) addEventHandler("onMarkerHit", marker, function ( hitElement, matchingDimension ) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then if getElementData(hitElement, "Show_GUI") ~= nil then triggerClientEvent(hitElement,"ShowGui",hitElement) end end end ) function AnimacjaTancerek() setPedAnimation (tancerka1, "STRIP", "Strip_G") setPedAnimation (tancerka2, "DANCING", "dnce_M_e") end function TeleportNaDyskoteke(player) if getElementType(player)=="player" then if source == marker3 then setElementPosition(player, 493.60000610352, -22.799999237061, 1000.700012207) setElementInterior(player, 17) setElementFrozen(player, true) setElementInterior(glosnik1, 17) setElementInterior(glosnik2, 17) setElementInterior(glosnik3, 17) setElementInterior(marker2, 17) setElementInterior(marker, 17) setElementInterior(stoldj, 17) setElementInterior(tancerka1, 17) setElementInterior(tancerka2, 17) setTimer(setElementFrozen, 1000, 1, player, false) end end end addEventHandler("onMarkerHit", marker3, TeleportNaDyskoteke) function TeleportZDyskoteki(player) if getElementType(player)=="player" then if source == marker2 then setElementPosition(player, 1834.6999511719, -1682.5999755859, 13.39999961853) setElementInterior(player, 0) setElementFrozen(player, true) setTimer(setElementFrozen, 1000, 1, player, false) end end end addEventHandler("onMarkerHit", marker2, TeleportZDyskoteki) addEventHandler("onPlayerLogin", root, function(_, acc) if isObjectInACLGroup("user."..getAccountName(acc), aclGetGroup("DJ")) then setElementData(source, "Show_GUI", true) else setElementData(source, "Show_GUI", nil) end end ) addEventHandler("onPlayerLogout", root, function(_, acc) triggerClientEvent(source, "LogOutSetVisible", root) setElementData(source, "Show_GUI", nil) end )
  20. bro are you sure that you are using this account "Matevsz".
  21. Show me your ACL.xml file
  22. Try this one function aclRel ( player ) if not isElement(player) then return end local account = getPlayerAccount ( player ) if account and not isGuestAccount(account) then local accountName = getAccountName ( account ) if ( isObjectInACLGroup ( "user." ..accountName, aclGetGroup ( "Admin" ) ) ) then local reloadacl = aclReload() if ( reloadacl ) then outputChatBox ( "acl Successfully reloaded.", player, 255, 0, 0 ) else outputChatBox ( "acl file not exist", player, 255, 0, 0 ) end else outputChatBox ( "You are not able to use this command", player, 255, 0, 0 ) end end end addCommandHandler ( "racl", aclRel )
  23. shutdown the server then open it.
×
×
  • Create New...