blinkerchris

Members
  • Content Count

    23
  • Joined

  • Last visited

Community Reputation

0 Neutral

About blinkerchris

  • Rank
    Civilian

Details

  • Gang
    havenoidea.com
  1. I'm using this one now, but it's not working 100% The problem is now that when I /chaton everything should work as normal, both chats should work. when /chatoff then ONLY mainchat should be disabled, teamchat should work. and mainchat doesn't work weither its on or not. Thanks chris
  2. There is no errors in the debugscript or console.
  3. Tested it. Now the chat works no matter what. When I /chatoff both chats still works =/ only teamchat should work when /chatoff, normal chat shouldn't. when /chaton both chats should work. Thanks chris.
  4. I tested it now, and the admin part works fine. but when I do /chatoff I can't use teamsay. that's my clue that I want to work =/ but the mainchat should still be disabled when /chatoff, only teamsay should work then. Thanks
  5. I have no idea how to do that. Could you help? Thanks
  6. blinkerchris

    Localmute

    Hello, I'm making a local mute script and I need some help. This is what I have so far. local chat = true function chatDis(thePlayer) outputChatBox("#E3E8B7The chat has been disabled by "..getPlayerName(thePlayer)..".",root,255, 255, 255, true) chat = false end addCommandHandler("chatoff", chatDis) function chatEn(thePlayer) outputChatBox("#E3E8B7The chat has been enabled by "..getPlayerName(thePlayer)..".",root,255, 255, 255, true) chat = true end addCommandHandler("chaton",chatEn) function onChat() if (chat == false) then cancelEvent() end end addEventHandler("onPlayerChat", root, onChat) Everything works fine with the lua above. But the thing I want is the teamchat should work all the time, when /chatoff then only local chat should be disabled. Not teamsay. and when /chaton, everything should work as normal. Only admins should be able to /chaton /chatoff Regards, chris. Thanks
  7. Thanks that works perfectly. Do you know how to make teamchat allowed? but the main chat disabled Also, only admins can /chaton /chatoff, not everyone. thanks again
  8. Yea, I know =/ do you know how to make it, if I write /chaton it will say 'The chat has been enabled by (the name im using) do you know how to make it like that?
  9. blinkerchris

    Chat mute

    Hey, I started on a new chatmute script and it seems to have errors, I know there are errors in the script because of the debugscript which says: ERROR: Loading script failed: localmute\client.lua:5: '' expected near 'end' I can't get it to work (I know that there are alot of mistakes) function chatdis(command) cancelEvent() outputChatBox("#E3E8B7The chat has been disabled by (localPlayerName)",source,255,0,0) addEventHandler("onPlayerChat",getRootElement(),chatdis) end end end ) function chaten(command) outputChatBox("#E3E8B7The chat has been enabled by (localPlayerName)",getRootElement(),255,0,0) removeEventHandler("onPlayerChat",getRootElement(),chatdis) end ) ) addCommandHandler("myname", function() local localPlayerName = getPlayerName(getLocalPlayer()) end ) addCommandHandler("chatoff",chatdis) addCommandHandler("chaton",chaten) Can you correct me? Thanks
  10. Hey, I'm wondering if this is totally wrong , I made a try to edit a scoreping & fps because I didn't like the display. The problem is that the PING is not showing on the screen, only the letters 'PING'. The FPS is working 100%, the ping is the problem. I want it to work the same way. Could you edit a bit on this? if thats what it needs? (I doubt that.) Thanks. Client local ping = getPlayerPing(getLocalPlayer()) local x, y = guiGetScreenSize ( ) r,g,b=0,0,0 alpha=150 local root = getRootElement() local player = getLocalPlayer() local counter = 0 local starttick local currenttick addEventHandler("onClientRender",root, function() if not starttick then starttick = getTickCount() end counter = counter + 1 currenttick = getTickCount() if currenttick - starttick >= 1000 then setElementData(player,"FPS",counter) counter = 0 starttick = false end end ) local root = getRootElement() local player = getLocalPlayer() local counter = 0 local starttick local currenttick addEventHandler("onClientRender",root, function() if not starttick then starttick = getTickCount() end counter = counter + 1 currenttick = getTickCount() if currenttick - starttick >= 1000 then setElementData(player,"PING",counter) counter = 0 starttick = false end end ) function drawStates () addEventHandler ( "onClientRender", root, pingState ) addEventHandler ( "onClientRender", root, fpsState ) end addEventHandler ( "onClientResourceStart", resourceRoot, drawStates ) function pingState() posx= x-30 posy= 20 dxDrawText ( getElementData(getLocalPlayer(),"PING"), posx2-12, posy2-6, x, y, tocolor ( 255, 255, 255, 255 ), 1.4, "default-bold" ) dxDrawText ( "FPS", posx2-13, posy2+10, x, y, tocolor ( 255, 255, 255, 255 ), 1.0, "default-bold" ) dxDrawText ( "PING", posx2+23, posy2+10, x, y, tocolor ( 255, 255, 255, 255 ), 1.0, "default-bold" ) end function fpsState() posx2= x-55 posy2= 13 dxDrawText ( getElementData(getLocalPlayer(),"FPS"), posx2-12, posy2-6, x, y, tocolor ( 255, 255, 255, 255 ), 1.4, "default-bold" ) dxDrawText ( "FPS", posx2-13, posy2+10, x, y, tocolor ( 255, 255, 255, 255 ), 1.0, "default-bold" ) dxDrawText ( "PING", posx2+23, posy2+10, x, y, tocolor ( 255, 255, 255, 255 ), 1.0, "default-bold" ) end Server addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function() call(getResourceFromName("scoreboard"),"addScoreboardColumn","FPS") call(getResourceFromName("scoreboard"),"addScoreboardColumn","PING") end )
  11. Thanks NeO! That worked 100% ) cheers!
  12. function daspawnzon() if not spx then outputChatBox("#E3E8B7The command will be available once the map is restarted!", 0, 0, 0, true) else local car = getPedOccupiedVehicle(localPlayer) if not car then return end setElementFrozen(car, false) setElementModel(car, model) setTimer(setElementFrozen, 2500, 1000, car, false) setElementHealth(car, 1000) setElementPosition(car, spx, spy, spz) setElementRotation(car, sprx, spry, sprz) triggerServerEvent('syncModel', resourceRoot, car, spm) bool setElementFrozen ( element theElement, bool freezeStatus ) end So that would be wrong?
  13. Yes I get that you have to edit the setElementFrozen part, but to what numbers? I tried 0, 0, Thanks
  14. Hey, I have a problem with a training script, the problem is that when I write /RES, (I will go to my spawn zone with /RES). And then my car freezes for like 2 secounds, and then I can drive. How to make it with 0 delays/make it drive at the time I write /RES? It's quite annoying. I'll paste the command(s) below. function daspawnzon() if not spx then outputChatBox("#E3E8B7The command will be available once the map is restarted!", 0, 0, 0, true) else local car = getPedOccupiedVehicle(localPlayer) if not car then return end setElementFrozen(car, true) setElementModel(car, model) setTimer(setElementFrozen, 2500, 1000, car, false) setElementHealth(car, 1000) setElementPosition(car, spx, spy, spz) setElementRotation(car, sprx, spry, sprz) triggerServerEvent('syncModel', resourceRoot, car, spm) end end addCommandHandler("RES", daspawnzon) I hope you get my point. Thanks!
  15. Okay, I tried that. I have to wait for people to test it now. Do you know any way to make the script save the teamname and points? ForExample: If EG// had 8 points and a yellow team color, and if I do /reconnect when the team has those points. Then when I'm joining, it's 0 points and the team color is back to normal. How to make them save the current points & team color? Thanks