Jump to content

lolman

Members
  • Posts

    70
  • Joined

  • Last visited

Everything posted by lolman

  1. client: local number = dxCreateFont("number.ttf",15) local zx, zy = guiGetScreenSize ( ) local resWtes,resHtes = 1280,720 local sWtes,sHtes = (zx/resWtes), (zy/resHtes) function deta() local BoneX,BoneY,BoneZ = getPedBonePosition(getLocalPlayer(), 4) local SBX,SBY = getScreenFromWorldPosition ( BoneX,BoneY,BoneZ ) local ip = triggerServerEvent("ip", getLocalPlayer()) if SBX and SBY then if getPedWeapon (getLocalPlayer()) ~= 0 then dxDrawText("IP"..ip, SBX,SBY-230, 290*sWtes, 250*sHtes, tocolor (200,31, 31, 150), 0.8*sWtes,0.8*sHtes,number,"left","top",false,false,false,true) end end end addEventHandler("onClientRender", root, deta) server : function ip(thePlayer, oponent) getPlayerIP(oponent) end addEvent("ip", true) addEventHandler("ip", getRootElement(), ip)
  2. Hello, Im stuck on a server side function which I want that it responds to the client side... The server side function what I want to the clientside is getPlayerIP... I want it like, that you can see other people IP as text. I tried triggerServerEvent and such but nothing works... if someone could help me out
  3. Thank you man, I'll try it out once I have the option to do so
  4. Well, you're right. I tried something like this... I don't know if this one is good or not. function catchbannedguy() for i, player in ipairs(getElementsByType("player")) do local accName = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then local banList = getBans() for banID, ban in ipairs ( banList ) do local bannedAccIP = getBanIP(source) local bannedAccSerial = getBanSerial(source) if (bannedAccIP == bannedAccSerial) then outputChatBox("** " ..getPlayerName(source).."'s IP:" ..getPlayerIP(source), player, 255, 0, 0) end end end end end addEventHandler("onPlayerJoin", getRootElement(), catchbannedguy)
  5. elseif getBanIP(source) == getBanSerial then outputChatBox("** " ..getPlayerName(source).."'s IP:" ..getPlayerIP(source), player, 255, 0, 0) I made this but is this good?
  6. Wow, dude... You're amazing ! worked !! But I now I want that if someone banned by serial as example and he comes back with an another pc, how could it show the ip adress then with a red color? What should I use?
  7. function getip(thePlayer) outputChatBox("* " ..getPlayerName(source).. "has joined the server", root, 155, 155, 0) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then outputChatBox("** " ..getPlayerName(source).."'s IP:" ..getPlayerIP(source), thePlayer, 0, 255, 0) end end addEventHandler("onPlayerLogin", getRootElement(), getip) error : attempt to concatenate local accName (a boolean value) someone help?
  8. I've fixed the first code, but now im stuck on the second part... I don't really know how to show it to a player which is admin...
  9. Hello, I want that if a player enters the server, the players IP will be printed out on the chatbox and only admins are able to see it. And how could you match the players IP if e.g. the player is banned serial but connects with other PC, if it matchs the player IP should be outputted with a red color on the chatbox if not then white. If someone could help me out, I'd appreciate it.
  10. Hmm wasnt that going automaticly? Because I once made a command which adds a ped and when I shot it, it lost hp and died...
  11. Maybe cancelevent onClientPlayerDamage but only if it's a ped. So you can maybe loop all peds to use the function...
  12. something like this? function blabla(thePlayer) setPlayerTeam(thePlayer, Red) end addEventHandler("onPlayerSpawn", getRootElement(), blabla)
  13. try setting a function name and then do setTimer(function name, 1000, 1)
  14. No, just set a timer on it so it will be updated every idk how much seconds you want... and for the color : getPlayerNametagColor getBlipColor
  15. createBlipAttachedTo but you have to loop players and then use the function.
  16. Wow dude, you're amazing ! thank you man
  17. Hi, I've a problem with my code... I want to set a timer on the onClientPlayerDamage part but it doesnt work very well... If someone could help me with setting a timer. I want that you will have 10 seconds protection and then you are damagable. function protect() if getElementAlpha(localPlayer) == 255 then setElementAlpha(localPlayer, 180) setElementData(localPlayer, "inv", true) end end addEventHandler("onClientPlayerSpawn", getRootElement(), protect) function() if getElementData(localPlayer, "inv") == true then cancelEvent() setElementData(localPlayer, "gmm", true) end end addEventHandler("onClientPlayerDamage", getRootElement(), cancelEvent) function seta() if getElementAlpha(localPlayer) == 180 then setElementAlpha(localPlayer, 255) end end setTimer(seta, 10000, 1)
  18. @Blaawee, the script for online admins... It shows the text under everytime there comes an another admin on. I want it like Available staff : admin name, admin name, etc
  19. Friendlyfire part? Btw your script doesn't work : error attempt to call global 'setPlayerWantedLevel' (a nil value)
  20. That's about scoreboard column. His script is encrypted so I don't know if the export is in his script (the scoreboard one)...
  21. Hey there, I've got a new problem here with my code. I want that if you're in the Police team then you can't get wanted levels and you can't damage other players which are not wanted... if someone could help me out... function wantedLevelChange(attacker, weapon, bodypart, loss) if getTeamName(getPlayerTeam(attacker)) == "Police" then cancelEvent() end end addEventHandler("onPlayerDamage", getRootElement(), wantedLevelChange) I know that my code isn't a really good begin of it but I don't know how to begin with it in this case...
  22. As I said, the problem with the available staff is fixed but now i got an another problem with the staff stuff which I posted recently, thanks tho
  23. doesn't change my team and skin back to the old one
  24. But as I said, I want it that if you press F3 again, you will have your old skin back and old team... if someone could help me out
×
×
  • Create New...