Jump to content

Robert333

Members
  • Content Count

    15
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Robert333

  • Rank
    Square
  1. Everyone has the problem too. If you create a Window with relative sizes the window will visibly on your PC super but on others not. So my solution is: Create the Window (just the window!) in absolute sizes, so on every PC your GUI has the same large. In the Window you can script your gui-elements in relative sizes again. Tip: --If you want your GUI showing in middle of screen use this code to get the pos and lengths local w = 200 --length on x 200px local h = 200 --length on y 200px local screenX, screenY = guiGetScreenSize () local x = screenX/2 - w/2 local y = screenY/2 - h/2 local
  2. for i = 1, 20 do if i ~= 15 then -- if the value i is not 15 the script go on else it do nothing -- do what you must do end end I think you mean this. But I also new in Lua, so it can maybe wrong or i haven't understood you.
  3. I think there is just a spelling mistake. You get with the function 'getPlayerOccupiedVehicle' the 'vehicle' and you set 'Vehicle' as variable, but then you called in 'fixVehicle' the variable 'theVehicle'. Try to set in 'fixVehicle' the variable 'Vehicle' or set the variable of 'getPlayerOccupiedVehicle' to 'theVehicle'. If you use Notepad++ you can avoid this mistakes by double clicking the variable, then notepad show you all words (variables) that have the same name.
  4. Maybe the Ped havn't the right slot of weapon, use setPedWeaponSlot to set M4 as Weapon for Ped. But I don't know whether that works I don't work with peds until now. function pedLoad() ped1 = createPed ( 287, 223, 1875, 18 ) giveWeapon( ped1, 31, 500, true ) setPedWeaponSlot ( ped1, 5 ) -- Slot 5, because M4 is a "Assault Rifles" and that is in Slot 5 end addEventHandler ( "onResourceStart", getRootElement(), pedLoad )
  5. Maybe the Ped havn't the right slot of weapon, use setPedWeaponSlot to set M4 as Weapon for Ped. But I don't know whether that works I don't work with peds until now. function pedLoad() ped1 = createPed ( 287, 223, 1875, 18 ) giveWeapon( ped1, 31, 500, true ) setPedWeaponSlot ( ped1, 5 ) -- Slot 5, because M4 is a "Assault Rifles" and that is in Slot 5 end addEventHandler ( "onResourceStart", getRootElement(), pedLoad )
  6. This should works, it's from Wiki: function createGate() gatePolice = createObject ( 987, -2494.3918457031, 1199.9107666016, 36.207420349121, 0, 0, 41.605255126953 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createGate ) function openGate( playerSource, commandName ) -- FROM WIKI (not mine, so it might be right) -- Open Gate if he has access local playerName = getPlayerName ( playerSource) -- Does he have access to Admin functions? if isObjectInACLGroup( "user." .. playerName, aclGetGroup ( "Admin" ) ) then -- He's an admin. Open the G
  7. This should works, it's from Wiki: function createGate() gatePolice = createObject ( 987, -2494.3918457031, 1199.9107666016, 36.207420349121, 0, 0, 41.605255126953 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createGate ) function openGate( playerSource, commandName ) -- FROM WIKI (not mine, so it might be right) -- Open Gate if he has access local playerName = getPlayerName ( playerSource) -- Does he have access to Admin functions? if isObjectInACLGroup( "user." .. playerName, aclGetGroup ( "Admin" ) ) then -- He's an admin. Open the G
  8. Robert333

    Cancel button

    Thats more clearly: function CreateLoginWindow() wdwLogin = guiCreateWindow( 226, 146, 372, 233, "[Admin Login System]", false ) guiSetVisible( wdwLogin, false ) guiWindowSetMovable( wdwLogin, false ) guiWindowSetSizable( wdwLogin, false ) tabpanel = guiCreateTabPanel( 0.0242, 0.0858, 0.9489, 0.8755, true, wdwLogin ) tab1 = guiCreateTab( "Login", tabpanel ) login = guiCreateButton( 0.1000, 0.8611, 0.2436, 0.1167, "Login", true, tab1 ) username = guiCreateLabel( 0.0113, 0.1167, 0.3768, 0.15, "UserName:", true,tab1 ) guiSetFont(username,"default-bold-small")
  9. Robert333

    Cancel button

    Thats more clearly: function CreateLoginWindow() wdwLogin = guiCreateWindow( 226, 146, 372, 233, "[Admin Login System]", false ) guiSetVisible( wdwLogin, false ) guiWindowSetMovable( wdwLogin, false ) guiWindowSetSizable( wdwLogin, false ) tabpanel = guiCreateTabPanel( 0.0242, 0.0858, 0.9489, 0.8755, true, wdwLogin ) tab1 = guiCreateTab( "Login", tabpanel ) login = guiCreateButton( 0.1000, 0.8611, 0.2436, 0.1167, "Login", true, tab1 ) username = guiCreateLabel( 0.0113, 0.1167, 0.3768, 0.15, "UserName:", true,tab1 ) guiSetFont(username,"default-bold-small")
  10. I didn't want to know how I script, maybe I asked a little bit complicated. I want help with the structure. Perhaps a example helps: function ***() blabla() if blabla then getblabla(bla,bla) end end or -- Function: *** -- function ***( ) blabla( ) -- do blabla if blabla then -- do something when blabla true getblabla ( bla, bla ) -- get blabla from blabla end -- end if end -- end function or function ***() blabla() if blabla then getblabla(bla,bla) end end and the structure of a resource: meta.xml client/client.lua server/server.lua or meta.xml c
  11. I didn't want to know how I script, maybe I asked a little bit complicated. I want help with the structure. Perhaps a example helps: function ***() blabla() if blabla then getblabla(bla,bla) end end or -- Function: *** -- function ***( ) blabla( ) -- do blabla if blabla then -- do something when blabla true getblabla ( bla, bla ) -- get blabla from blabla end -- end if end -- end function or function ***() blabla() if blabla then getblabla(bla,bla) end end and the structure of a resource: meta.xml client/client.lua server/server.lua or meta.xml c
  12. I mostly no newbie today in scripting LUA, but in last time I always fail at the structure and management of my script/resource. In the last weeks I wrote and I will do in future a gamemode. But now the script is long and unclearly. I tried to clean the code with the "--" Tag and wrote above all functions a header, but it was just unclearly too. Then I have split my "script_server.lua" and "script_client.lua" in many different LUA-Files, but that isn't a solution too. Maybe someone can help and write down his structure of resources. Another problem is in the script. For example should I use
  13. I mostly no newbie today in scripting LUA, but in last time I always fail at the structure and management of my script/resource. In the last weeks I wrote and I will do in future a gamemode. But now the script is long and unclearly. I tried to clean the code with the "--" Tag and wrote above all functions a header, but it was just unclearly too. Then I have split my "script_server.lua" and "script_client.lua" in many different LUA-Files, but that isn't a solution too. Maybe someone can help and write down his structure of resources. Another problem is in the script. For example should I use
  14. First, I'm german, so don't criticize my English. I've one Question: Where can I find the Events. The Functions I founded, they are on the right side, but where are the Events. Maybe I'm too stupid to find them, but maybe someone can help.
  15. Why Psychomania? Sure, there are already enough servers with different Games. Why not, we say! Certainly you are also irritated that your favorite Server is full or the players are unfriendly. Now is finished with it. Psychomania offers all your favorite Games of other Servers, e.g.: Freeroam GUI, Race, FalloutV2, Assault, Stealth, Classic Deathmatch, Team Deathmatch, and more These Games are supported by excellent Scripts which still improve in appearance of the stay on the server: like Superweapons, Paintball, Headshot, Glue, Wantedlevel, Interior, Airbrake, and more And because you m
×
×
  • Create New...