Jump to content

Visma

Members
  • Posts

    13
  • Joined

  • Last visited

Details

  • Gang
    CIT

Visma's Achievements

Square

Square (6/54)

0

Reputation

  1. Didnt work Worked thank you finally fixed
  2. Now it doesnt work at all @JR10, the debug doesnt give me anything either. TAPL how would i do that?
  3. Still does not work, First i do not have godmode, i join the staff team and have godmode but then once i leave the staff team and join a different one i still have godmode.
  4. I done that, now I click the buttons the gui closes but nothing happens
  5. Client addEventHandler ( "onClientPlayerDamage", getRootElement (), function(attacker, weapon, bodypart, loss) if getElementData(source,"admin") then cancelEvent() end end) Server function admin () local playerName = getTeamName ( source,"Staff" ) if ( playerName == true ) then setElementData(source,"admin",true) if ( playerName == false ) then setElementData(source,"admin",false) end end end addEventHandler("onPlayerChangeTeam",resourceRoot,admin)
  6. The buttons do not work Client GUIEditor = { button = {}, window = {}, label = {} } function createLSTeleportGUI() GUIEditor.window[1] = guiCreateWindow(834, 424, 254, 111, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(29, 21, 192, 24, "Teleport to LS?", false, GUIEditor.window[1]) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) GUIEditor.button[1] = guiCreateButton(18, 57, 104, 33, "Yes", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(134, 57, 104, 33, "No", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") guiSetVisible(GUIEditor.window[1],false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () createLSTeleportGUI() end ) function openLSTeleportGUI() guiSetVisible(GUIEditor.window[1],true) showCursor(true,true) end addCommandHandler("teleportme",openLSTeleportGUI) addEventHandler("onClientGUIClick", GUIEditor.button[1], teleportPlayer, false) addEventHandler("onClientGUIClick", GUIEditor.button[2], openLSTeleportGUI, false) function teleportPlayer(button,state) if button == "left" and state == "up" then triggerServerEvent("movePlayerToPosition",getLocalPlayer(),1917.7863769531,-2411.640625,13.53911781311) outputChatBox("You have teleported to LS. Use /teleport to go back.") guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end function openLSTeleportGUI(button,state) if button == "left" and state == "up" then guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end Server function moveThePlayer(x,y,z,rotation) if x and y and z and rotation then local skin = getElementModel(client) spawnPlayer(client,x,y,z,rotation,skin) setCameraTarget(client,client) end end addEvent("movePlayerToPosition",true) addEventHandler("movePlayerToPosition",root,moveThePlayer)
  7. still doesnt work. I change team and i still get godmode
  8. I made a script that I want godmode to only work if you are on the staff team, once switch to a different one i want it to stop working. At the moment it works with every team. Client: addEventHandler ( "onClientPlayerDamage", getRootElement (), function(attacker, weapon, bodypart, loss) if getElementData(source,"admin") then cancelEvent() end end) Server: function admin () local playerTeam = getPlayerTeam (source,"Staff") if ( playerTeam) then setElementData(source,"admin",true) if ( playerTeam == false ) then setElementData(source,"admin",false) end end end addEventHandler("onPlayerChangeTeam",resourceRoot,admin)
  9. I am trying to learn how to script i have read the wiki and trying to make my first script. The script i am trying to make is if you use the command /teleport it will teleport you 5 in the x direction. It gives me an error on line 2 argument 1 and line 3 "attempt to perform arithmetic on local "x" (a boolean value) function spawnPlayer(thePlayer, command) local x,y,z = getElementPosition(thePlayer) x = x + 5 local spawnedPlayer = spawnPlayer(x,y,z) if (spawnedPlayer == true) then outputChatBox("You have teleported",thePlayer) end end addCommandHandler("teleport", spawnPlayer) Please do not just fix it, explain it to me. Thanks in advance.
  10. Visma

    MTA Crashes

    fixed it by running MTA as admin
  11. Visma

    MTA Crashes

    It crashes when i login to a server
  12. Visma

    MTA Crashes

    http://pastebin.mtasa.com/522690274 EAX=0000000C EBX=008E48AC ECX=00000003 EDX=52FA564B ESI=63C0BE6B EDI=0028EDCC EBP=0000000C ESP=0028ED8C EIP=007ECAFB FLG=00210206 CS=0023 DS=002B SS=002B ES=002B FS=0053 GS=002B
×
×
  • Create New...