Zuher Laith

  • Content count

  • Joined

  • Last visited

Community Reputation

5 Neutral

About Zuher Laith

  • Rank
  • Birthday 26/04/00


  • Location
  • Occupation
    Programmer in VB.NET, C#, LUA, Some Others.
  • Interests
  1. Players Blip Visibility in Server

    The players blip originally created by a resource called "playerblips" I should stop that .. right ?, and what do you exactly mean by "excluding the local player"? do you think it might work If I used SetBlipVisibleDistance when creating the blip in "playerblips" resource ?
  2. Players Blip Visibility in Server

    Up .......
  3. Players Blip Visibility in Server

    here is what I came up with (a result that needs work) The marker is not moving when the player move . I didn't test this so far .. I feel Its not right,
  4. Players Blip Visibility in Server

    Hi everyone, So I'm working on making the blip on a player (which is blip 0) being removed in the server, But I'm taking this on another level, each player near me in the radar, his blip will show up in specific color lets say white, if he is outside my radar view and far, his blip will be destroyed (for client) this is a GIF to make the idea more clear: I have done this in a custom blip (I created myself) not a player blip, but same idea. Another thing.. If I created a blip 0 (by another resource) on player, and make it colored to blue for example, It works fine but when I go near that blue blip and the code gets executed it will be destroyed, so we need an exception (for color maybe?..) I've found some examples here on destroying each player blip being activated by a commandhandler for once, not what I need .. About the code .. well, I have the idea but I don't know what to do in code to make all this possible .. Any help is appreciated .
  5. createBlip on Player for a specific Team or Group

    This might take me a few days, since I'm having a trouble with opening ports .. that's another thing, Until then, I'll send another reply here. Thank you so much for your help
  6. createBlip on Player for a specific Team or Group

    I love your humor with coding I see.. now I get it, but when I make the blip visible for the "player" or "v" in "for...do", I'm trying to make it visible for the player itself: I'm running this on a server but I'm the only one suppose to test it, So If the player was not in the aclGroup, it just shows the msg "You called Police", and no Debug String message shown in the Debug script, and no blip visible in client . What I want you to confirm, is this working if a player is not in aclGroup ?
  7. createBlip on Player for a specific Team or Group

    That example output a list for chat ... I couldn't figure out how to make it work for the "for .... do" code ..
  8. Hi everyone, So I'm trying to make a button that create a blip on player, the blip is visible to him & for a specific Group, well I just did it for team, I want it for group .. At first a blip attached to player, and visible to client & each player in that group (acl group), and setting the blip color to green using SetBlipColor , and another button that remove the blip on client & in the other players map, This is only server sided, the client triggers the event from gui for sure .. local playerBlipRoot = createElement("playerBlipRoot", "playerBlipRoot") local blipvisible, myBlip blipvisible = false -- The Calling Function: -- function local theTeam = getTeamFromName(get("Police")) for index, polices in ipairs(getPlayersInTeam(theTeam)) do if blipvisible == false then -- chat msg to "polices", "help requisted, check your gps." -- chat msg to "client", "you called police." myBlip = createBlipAttachedTo(Player, 20) setElementParent(myBlip, playerBlipRoot) setElementVisibleTo ( myBlip, polices, true ) blipvisible = true else -- chat msg to "client", "you already called the police." return end -- end -- THE REMOVING BLIP ELEMENT: -- function destroyElement(myBlip) blipvisible = false -- enough.. right ? -- end Instead of blip 20, I want to change it to 0 and make it colored to green, since I'm willing to remove blip 0 from every single player, I hope its clear enough .. Thanks in advance.
  9. attempt to index global 'Player' (a nil value)

    Good Advice I'll work with it, Thanks .
  10. attempt to index global 'Player' (a nil value)

    Well, let me be honest with you, I wasn't the one who wrote this code, that's how it became difficult to me to understand it. I've just read about OOP and getting rid of it might requires re-writing the whole resource, correct ?
  11. attempt to index global 'Player' (a nil value)

    I guess yeah, it worked but after triggering again, an error pop out on dxoutput.client.lua on this at line 5: local message_moving_back_timer; function dxOutputMessage(message, r, g, b) if (message_moving) then removeEventHandler("onClientRender", root, moveMessage); end if (message_moving_back) then removeEventHandler("onClientRender", root, moveMessageBack); end if (message_moving_back_timer and message_moving_back_timer:isValid()) then message_moving_back_timer:destroy(); end -- message_moving_back_timer cur_left, cur_message, cur_color = relative_width * 1440, message or "", {r or 255, g or 255, b or 255}; message_moving_back_timer = setTimer(hideMessage, 5000, 1); addEventHandler("onClientRender", root, moveMessage); message_moving = true; end the error I got:
  12. Hello everyone, I'm working on a resource that sends a dx message to the player on both server/client side and gets called from other resources . this is the full code: So in case I want to call and pass a message on server side from another resource, I use this: and If I wanted to pass it on client side, I use "call" function: this is the first error I got after debugging: I know its a bit messy, Any help is appreciated .
  13. In case it happened in another resource I'll add it, Its ok right ?
  14. Oh, so that's how it is ... Thank you so much for help !