Jump to content

Entity

Members
  • Posts

    54
  • Joined

  • Last visited

Everything posted by Entity

  1. When I join, it loads money and outputServerLog outputs: START: 0.12, ????????????????????????, RFT and when i quit it also saves money perfectly cause it outputs: STOP: 0.12, ????????????????????????, RFT but then when I start again it doesn't load the money and outputs: START: 0, ????????????????????????, RFT and when i quit STOP: 0, ????????????????????????, RFT
  2. Server: ResourceRootS = getResourceRootElement() Password = "RFT" function eventSpawnPlayer(Player,Skin) local Serial = getPlayerSerial(Player) local Account = getAccount(Serial) if (Account) then local Money = getAccountData(Account,"Money") setElementData(Player,"Money",Money) spawnPlayer(Player,935.82421875,2143.9340820313,1011.0234375,270,Skin,1,0) fadeCamera(Player,true) setCameraTarget(Player,Player) outputServerLog("START: " .. tostring(Money) .. ", " .. Serial .. ", " .. Password) else local Account = addAccount(Serial,Password) outputChatBox("Type /masterkey to set up your MasterKey.",Player) setAccountData(Account,"Money",0.12) setElementData(Player,"Money",0.12) spawnPlayer(Player,935.82421875,2143.9340820313,1011.0234375,270,Skin,1,0) fadeCamera(Player,true) setCameraTarget(Player,Player) end end addEvent("eventSpawnPlayer",true) addEventHandler("eventSpawnPlayer",ResourceRootS,eventSpawnPlayer) function eventPlayerQuit() local Serial = getPlayerSerial(source) local Account = getAccount(Serial) if (Account) then local Money = getElementData(source,"Money") setAccountData(Account,"Money",Money) outputServerLog("STOP: " .. tostring(Money) .. ", " .. Serial .. ", " .. Password) end end addEventHandler("onPlayerQuit",getRootElement(),eventPlayerQuit)
  3. It is possible, you just have to make the converter (or the software itself).
  4. Do you mean column below column?
  5. He probably wants to make it in GUI.
  6. Well it would be great if it existed, it would allow scripters to make custom animations or even physics.
  7. Is it possible to move single part of player's body (e.g. right hand...)?
  8. No, type does not do anything, it is just used for identifying on community.multitheftauto.com
  9. @Samer: It doesn't matter what you put under type, it doesn't affect the script.
  10. Go to mtaserver.conf and stop all resources from starting. Then in console start them manually and if it shuts down post the script of resource that made it shut down and I'll try to fix it.
  11. Did you start the resource in the console? Are meta.xml and blips.lua in the same directory?
  12. https://wiki.multitheftauto.com/wiki/SpawnPlayer
  13. He must be trolling with us, this is Squirrel language and it's for IV:MP.
  14. Is this supposed to work on Windows 7, because it crashes every time for me.
  15. Entity

    problem

    OK, then. You can PM it to me.
  16. Entity

    problem

    Post your full script and I can try to fix it.
  17. Entity

    problem

    Shouldn't one of the events be 'onVehicleExit'.
  18. Entity

    Anti vote spam

    It doesn't have any errors now, but I'm not sure if it works. function mutePlayers() for _, player in ipairs ( getElementsByType ( "player" ) ) do setPlayerMuted(player, true) outputChatBox("#FF0000All has been muted.",player, 255, 255, 255, true ) end end addEventHandler("onPollStarting",root, mutePlayers) function unmutePlayers(state) for _, player in ipairs ( getElementsByType ( "player" ) ) do if state=="LoadingMap" then setPlayerMuted(player, false) outputChatBox("#FF0000All has been unmuted.",player, 255, 255, 255, true ) end end end addEventHandler("onRaceStateChanging",root, unmutePlayers)
  19. Just put the downloaded ZIP file in 'server\mods\deathmatch\resources'
  20. Entity

    Fu Help!

    function setTeams() setPlayerTeam(source, getTeamFromName("Off Duty Workers")) end addEvent("onPlayerClikin", true) addEventHandler("onPlayerClikin", root, setTeams) function setTeam() setPlayerTeam(source, getTeamFromName("Unemployed")) setElementData(source, "Occupation", "Unemployed") end addEvent("onPlayerCliking", true) addEventHandler("onPlayerCliking", root, setTeam)
  21. Entity

    Fu Help!

    Server: teamOffDutyWorkers = createTeam("Off Duty Workers") teamUnemployed = createTeam("Unemployed") Unemployed = "Unemployed" -- change this to what you want function setTeams ( player ) setPlayerTeam ( player, getTeamFromName("Off Duty Workers")) end addEvent("onPlayerClikin", true) addEventHandler("onPlayerClikin", root, setTeams ) function setTeam ( player ) setPlayerTeam ( player, getTeamFromName("Unemployed")) setElementData (player, "Occupation", Unemployed) end addEvent("onPlayerCliking", true) addEventHandler("onPlayerCliking", root, setTeam )
  22. spfont = dxCreateFont("digital.ttf", 21) imageDisc = guiCreateStaticImage( 0.68, 0, 0.32, 0.08333, "disc.png", true, nil) guiSetVisible(imageDisc, false) function HandleTheRender ( ) addEventHandler ( "onClientRender", root, vehiclestatus ) removeEventHandler ( "onClientRender", root, vehiclestatus1 ) end addEventHandler("onClientVehicleEnter", getRootElement(), HandleTheRender) addCommandHandler ("setkph" , HandleTheRender) function HandleTheRender1 ( ) removeEventHandler ( "onClientRender", root, vehiclestatus ) addEventHandler ( "onClientRender", root, vehiclestatus1 ) end addCommandHandler ("setmps" , HandleTheRender1) function StopTheRender ( ) removeEventHandler ( "onClientRender", root, vehiclestatus ) removeEventHandler ( "onClientRender", root, vehiclestatus1 ) guiSetVisible(imageDisc, false) end addEventHandler("onClientVehicleExit", root, StopTheRender) function vehiclestatus () showClientImage() end function showClientImage() if (isPedInVehicle (localPlayer) == true) then guiSetVisible(imageDisc, true) sx, sy, sz = getElementVelocity (getPedOccupiedVehicle(localPlayer)) speed = math.floor(((sx^2 + sy^2 + sz^2)^(0.5))*180) health = getElementHealth (getPedOccupiedVehicle(localPlayer)) name = getVehicleName (getPedOccupiedVehicle(localPlayer)) currenthealth = math.floor(health/10) screenWidth, screenHeight = guiGetScreenSize() windowWidth, windowHeight = 300,170 left = screenWidth/1.10 - windowWidth/20 top = screenHeight/1.08 - windowHeight/20 dxDrawText ( ""..tostring(speed).." km/h", left, top -25, screenWidth, screenHeight, tocolor ( 153, 230, 0, 255 ), 0.5, spfont ) end end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), showClientImage )
  23. spfont = dxCreateFont("digital.ttf", 21) function HandleTheRender ( ) addEventHandler ( "onClientRender", root, vehiclestatus ) removeEventHandler ( "onClientRender", root, vehiclestatus1 ) end addEventHandler("onClientVehicleEnter", getRootElement(), HandleTheRender) addCommandHandler ("setkph" , HandleTheRender) function HandleTheRender1 ( ) removeEventHandler ( "onClientRender", root, vehiclestatus ) addEventHandler ( "onClientRender", root, vehiclestatus1 ) end addCommandHandler ("setmps" , HandleTheRender1) function StopTheRender ( ) removeEventHandler ( "onClientRender", root, vehiclestatus ) removeEventHandler ( "onClientRender", root, vehiclestatus1 ) end addEventHandler("onClientVehicleExit", root, StopTheRender) function vehiclestatus () showClientImage() end function showClientImage() if (isPedInVehicle (localPlayer) == true) then guiCreateStaticImage( 0.68, 0, 0.32, 0.08333, "disc.png", true, nil) sx, sy, sz = getElementVelocity (getPedOccupiedVehicle(localPlayer)) speed = math.floor(((sx^2 + sy^2 + sz^2)^(0.5))*180) health = getElementHealth (getPedOccupiedVehicle(localPlayer)) name = getVehicleName (getPedOccupiedVehicle(localPlayer)) currenthealth = math.floor(health/10) screenWidth, screenHeight = guiGetScreenSize() windowWidth, windowHeight = 300,170 left = screenWidth/1.10 - windowWidth/20 top = screenHeight/1.08 - windowHeight/20 dxDrawText ( ""..tostring(speed).." km/h", left, top -25, screenWidth, screenHeight, tocolor ( 153, 230, 0, 255 ), 0.5, spfont ) end end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), showClientImage )
  24. Entity

    Fu Help!

    Client: GUIEditor_Window = {} GUIEditor_Button = {} dutywindow = guiCreateWindow(234,200,361,174,"Duty Panel",false) offbutton = guiCreateButton(72,47,104,39,"Go Off Duty",false,dutywindow) rebutton = guiCreateButton(192,47,95,39,"Resign",false,dutywindow) closebutton = guiCreateButton(150,110,78,44,"Close",false,dutywindow) guiSetVisible(dutywindow, false) function closeChangeJobWindow() if (source == closebutton) then guiSetVisible(dutywindow, false) showCursor(false) end end addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), closeChangeJobWindow) function lol() if (guiGetVisible(dutywindow) == false) then guiSetVisible(dutywindow, true) showCursor(true) end end bindKey("F3","down",lol) function teamResign() if (source == rebutton) then triggerServerEvent ("onPlayerCliking",getLocalPlayer()) end end addEventHandler("onClientGUIClick", rebutton, teamResign, false ) function teamOff() if (source == offbutton) then triggerServerEvent ("onPlayerClikin",getLocalPlayer()) end end addEventHandler("onClientGUIClick", offbutton, teamOff, false )
×
×
  • Create New...