Jump to content

Bilal135

Members
  • Posts

    843
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Bilal135

  1. Actually it is supposed to spawn player with the skin which player selects in the skin_window GUI. So what should I use to get to know what skin the player has selected in the skin_window GUI?
  2. Since its been a long time I was inactive and didn't script anything for quite a while, so I forgot a few things. I created a spawn manager system which should spawn the player at the particular place with the skin he selects. I can't seem to find the problem, but it does spawn the player at the right place, but doesn't set the right one skin. Full script code: Client: addEvent("OnLogin", true) function onPlayerLogin() window = guiCreateWindow(321, 153, 538, 441, "L4D: Spawn Manager", false) guiWindowSetSizable(window, false) guiSetAlpha(window, 1.00) label = guiCreateLabel(11, 25, 716, 19, "Select a spawn location and a skin.", false, window) gridlist = guiCreateGridList(10, 54, 519, 327, false, window) spawn_column = guiGridListAddColumn(gridlist, "Location", 0.9) for i = 1, 2 do guiGridListAddRow(gridlist) end guiGridListSetItemText(gridlist, 0, 1, "Pershing Square", false, false) guiGridListSetItemText(gridlist, 1, 1, "Idlewood Gas Station", false, false) btn_spawn = guiCreateButton(10, 391, 131, 35, "Spawn", false, window) label_tip = guiCreateLabel(151, 401, 300, 15, "Tip: You MUST choose a skin and a location to spawn.", false, window) guiSetFont(label_tip, "default-bold-small") skin_window = guiCreateWindow(857, 153, 201, 441, "Skin", false) guiWindowSetSizable(skin_window, false) guiSetAlpha(skin_window, 1.00) skin_gridlist = guiCreateGridList(9, 53, 182, 327, false, skin_window) skin_column = guiGridListAddColumn(skin_gridlist, "Skin", 0.9) for i = 1, 2 do guiGridListAddRow(skin_gridlist) end guiGridListSetItemText(skin_gridlist, 0, 1, "CJ", false, false) guiGridListSetItemText(skin_gridlist, 1, 1, "Test", false, false) showCursor(true) end addEventHandler("OnLogin", root, onPlayerLogin) function onClickButtonSpawn() if (source == btn_spawn) then local row_spawn = guiGridListGetSelectedItem( gridlist ) local name_spawn = guiGridListGetItemText( gridlist , row_spawn, spawn_column) local row_skin = guiGridListGetSelectedItem( skin_gridlist ) local name_skin = guiGridListGetItemText( skin_gridlist , row_skin, skin_column) if name_spawn == "Pershing Square" then triggerServerEvent("SpawnPlayer_PershingSquare", localPlayer) guiSetVisible(window, false) guiSetVisible(skin_window, false) end if name_spawn == "Idlewood Gas Station" then triggerServerEvent("SpawnPlayer_IGS", localPlayer) guiSetVisible(window, false) guiSetVisible(skin_window, false) end if name_skin == "CJ" then setElementModel(localPlayer, 0) end if name_skin == "Test" then setElementModel(localPlayer, 20) end end end addEventHandler("onClientGUIClick", root, onClickButtonSpawn) Server: addEvent("SpawnPlayer_PershingSquare", true) addEvent("SpawnPlayer_IGS", true) local PershingSquare_spawnX, PershingSquare_spawnY, PershingSquare_spawnZ = 1536.2517089844, -1683.3726806641, 13.546875 function joinHandler_PershingSquare() spawnPlayer(source, PershingSquare_spawnX, PershingSquare_spawnY, PershingSquare_spawnZ) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("SpawnPlayer_PershingSquare", getRootElement(), joinHandler_PershingSquare) local IGS_spawnX, IGS_spawnY, IGS_spawnZ = 1959.55, -1714.46, 10 function joinHandler_IGS() spawnPlayer(source, IGS_spawnX, IGS_spawnY, IGS_spawnZ) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("SpawnPlayer_IGS", getRootElement(), joinHandler_IGS) function onLogin() triggerClientEvent(source, "OnLogin", source) end addEventHandler("onPlayerLogin", root, onLogin) function hideCursor() showCursor(source, false) end addEventHandler("onPlayerSpawn", root, hideCursor) Thanks in advance.
  3. Discussion start kro, sab ki boltiyan band kyun ho gain? Hameu board ko active rakhna hai.
  4. And... can GTA SA and GTA V run on an intel compute stick?
  5. Bilal135

    Browsers

    Which browser do you use and prefer? I use chrome (windows 10 Pro). Microsoft Edge helds a little some times. So, comment yours!
  6. What about GTA SA? How can it run on mobile devices?
  7. I was really curious about this. I am not much a technical guy, but I really want to know why can't GTA V support android system? We can watch GTA V videos on YouTube on a mobile phone, so why can't we play it? Or if it is possible to run GTA V on Android, will Rockstar ever make it for android or iOS?
  8. /stop spawnmanager - That should do it. You can try Bonsai's multi-game mode. https://forum.multitheftauto.com/viewto ... 53f2468159
  9. https://forum.multitheftauto.com/viewto ... 21587d841b
  10. So are you? You think I am a fool?
  11. You want to sell your sh*t which you possibly don't have, or none of your sh*t works. Kids these days.....
  12. GitHub is way too much technical, for me at least. I need to learn how to deal with GitHub before, so for now, I'll stick with the update method on community.
  13. A developer preview version will be launched soon for developers' convenience. Nothing much would be changed but mostly variable names to something more suitable for the relevant function.
  14. All he said was that the code isn't organized, and he's right. Trying to read and figure out how the code is working when you're not even using indentation can be a pain. It was just some criticism, no need to jump to name calling The variable names for your buttons are nonsensical and just random names. You should try and keep it simple. For example if a button sets their team, name it something logical such as "buttonSetPlayerTeamUSA" instead of "yoi_button1". Of course, people write differently, but if you're planning to release stuff you might want to look into cleaning it up a bit to avoid such criticism In fact, this was not supposed to be released, so I did it in my way. I don't have time to change variables, so for own convenience, anyone can change them, at last its not compiled.
  15. The whole thing is linked with each other, and nothing from a trash can works, so take a chill pill. You never understood the code at first, and came here to bark at my code, drunk guy.
  16. Poll has ended. Download at, viewtopic.php?f=108&t=93417
  17. MTA: Modern Warfare was a project developed by Techray Development, but due to lack of time and developers' inactivity, the project was postponed. (Active once again, as of, 3/1/16) Releasing the whole source code was a big decision, and so we expect some talented developer to continue and make this project more successful. This game mode is based on default graphical user interface. The code might contain some serious bugs, that need to be fixed before it can run properly, as this is only the BETA version. The original fixed code was lost by the company due to hardware failures of the specific PC which contained the files. Feature's Highlight: Installation: For more information, visit the project's actual topic, viewtopic.php?f=115&t=90684 Any further updates to the code are not expected. Have a nice day.
  18. The postponed project MTA Modern Warfare might not develop further in future, so I thought of releasing the source code instead. Just a simple poll, should I release the source code, or just keep it myself and continue developing when I have time? Thanks in advance. RESULT: YES (8 votes - YES, 4 votes - NO)
  19. Looks like photoshop to me....
  20. Because he is a musketeer.
  21. Bilal135

    Problem

    Error: Loading script failed, unexpected symbol near "+"
  22. Bilal135

    Problem

    I've never done such thing, so can someone please put an example?
  23. Bilal135

    Problem

    I have a problem with my reputation system. This should increase everyone's reputation 0.25 once every 1 minute, but this is not working. function timer() newValue = + 0.05 setTimer(function() setElementData(source, "Rep", newValue) end, 60000, 0) end Thanks in advance.
×
×
  • Create New...