-
Posts
256 -
Joined
-
Last visited
-
Days Won
3
Everything posted by marty000123
-
Spawn after login: function greenLogin() local acc = getPlayerAccount(source) if getAccountData(acc, "green") == true then setPlayerTeam(source, getTeamFromName("Special Military Unit")) spawnPlayer (source, 235.47963, 1872.47766, 11.46094, 180, 287, 0) triggerClientEvent("class", source) end end addEventHandler("onPlayerLogin", getRootElement(), greenLogin) (I have 3 scripts like this, one for the SMU team, and 2 other teams, but im not sure if thats relevant...)
-
Loki, Thanks for the problem 1 fix, it worked. Problem 4 fix didn't sadly. Problem 2: No errors/warnings/whatsoever. It appears that I actually spawn after login, but the screen stays black. It's like the camera+player position freezes. Because I can see the spawn protection gui on my screen, even tho it's all black. I can also scroll my weapons, as I can see it in my admin panel. But I can't hear my shooting, making me think that the camera is somewhere at the edge of the universe.
-
Problem 1: function getInMarker(hitElement, matchingDimension) local acc = getPlayerAccount(hitElement) if getAccountData(acc, "green") == true then triggerClientEvent("skin", hitElement) end if not getAccountData(acc, "green") == true then else outputChatBox("You're not with the Special Military Unit!", hitElement, 255, 0, 0) end end addEventHandler("onMarkerHit", marker1, getInMarker) My AccountData(acc, "green") is true. I made sure of that. Yet, it also gives the chatbox output. Why is that? Btw can u guys make it so when a vehicle enters the marker, nothing happens? I tried a few things but couldn't figure out how to do it. Problem 2: This problem occured to me, and a few others. To others, it didn't. Weird. After the player logs in, they can choose between a team and class. Normally they would spawn, but now they don't. They're stuck on a black screen, and if the mode Freeroam is on, all they can see is a sky (above the Mt Chilliad). To spawn, you have to click on F1, map, then double click somewhere. But normally, you should be able to just spawn when you enter the class panel. Some players are able to do it just this way, so I'm wondering why not us? I'm thinking this is a server problem as I'm not the only one. But what's weird is that when the player logged out at a certain spot, and when he logs back in, the player's blip is still at the old place. (Only when freeroam is on). There we are, problem number 3. Problem 3: When I change team and die, the blip doesn't change color. No warnings/errors. When I do /kill (simple script: function() killPlayer addcommandhandler kill), it gives a couple of warnings (the same time each time): playerblips.lua:66: Bad Argument @ getElementType expected element at argument 1 got boolean. I suspect this has something to do with problem 2, maybe the blip doesn't disappear on logout, or something goes wrong? As the blip stays at the location when the bug of problem 2 appears, on the location where the player logged out last time. Part of the script: function destroyBlipsAttachedTo(player) local attached = getAttachedElements ( player ) if ( attached ) then for k,element in ipairs(attached) do LINE 66= if getElementType ( element ) == "blip" then destroyElement ( element ) end end end end Problem 4: I have a Skin Selector script. 6 buttons, 6 skins. If you click a button, a server-side script will be triggered. But for some reason, only one of those buttons work. Well, they all work as the gui disappears everytime someone clicks a button, but the skin actually changes on only one button and I have no idea why as I copy-pasted the same script, so it's weird that a random button works and the rest don't. For some strange :Oing reason, only the VIP skin change works.. Script: SERVER: function sergeant() setElementModel(source, 278) end addEventHandler ( "sergeant", getRootElement(), sergeant ) addEvent("sergeant", true) function commander() setElementModel(source, 279) end addEventHandler ( "commander", getRootElement(), commander ) addEvent("commander", true) function vip() setElementModel(source, 50) end addEventHandler ( "vip", getRootElement(), vip ) addEvent("vip", true) -- CLIENT: GUIEditor.button[3] = guiCreateButton(92, 227, 250, 83, "Male 2", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(448, 229, 271, 81, "V I P", false, GUIEditor.window[1]) GUIEditor.button[5] = guiCreateButton(91, 353, 251, 85, "Male 3", false, GUIEditor.window[1]) addEventHandler("onClientGUIClick",root, function() if source == GUIEditor.button[1] then triggerServerEvent("recruit", localPlayer) showCursor(false) guiSetVisible(GUIEditor.window[1], false) end if source == GUIEditor.button[2] then triggerServerEvent("commander", localPlayer) showCursor(false) guiSetVisible(GUIEditor.window[1], false) end if source == GUIEditor.button[3] then triggerServerEvent("soldier", localPlayer) showCursor(false) guiSetVisible(GUIEditor.window[1], false) end if source == GUIEditor.button[4] then triggerServerEvent("vip", localPlayer) showCursor(false) guiSetVisible(GUIEditor.window[1], false) end if source == GUIEditor.button[5] then triggerServerEvent("sergeant", localPlayer) showCursor(false) guiSetVisible(GUIEditor.window[1], false) end if source == GUIEditor.button[6] then triggerServerEvent("female", localPlayer) showCursor(false) guiSetVisible(GUIEditor.window[1], false) end if source == GUIEditor.button[7] then showCursor(false) guiSetVisible(GUIEditor.window[1], false) end end )
-
All it appears to be doing is INFO: Logging to this file ended [2017-04-14 19:56:45] INFO: Pressed Username [2017-04-14 19:56:48] INFO: Pressed Password [2017-04-14 19:56:51] INFO: Pressed 1 checkbox [2017-04-14 19:56:52] INFO: Pressed Log In INFO: Logging to this file ended [2017-04-14 21:55:21] INFO: Pressed Username [2017-04-14 21:55:23] INFO: Pressed Username [2017-04-14 21:55:23] INFO: Pressed Log In INFO: Logging to this file ended
-
Looks great, I'll surely give it a shot! Now I don't have to buy BG or H1Z1 anymore
- 5 replies
-
- battle-royale
- pvp
-
(and 2 more)
Tagged with:
-
I've recently made a server with a (finally) working spawn panel. But when I login, the screen turns black. I see the class manager, my team is set, my skin is set, but I'm not spawned. Other players don't have this issue. Can anyone help me? I removed all my MTA resources but with no luck.
-
Trust me, I did exactly that and it didnt work. (i split the script into 6, 3 colors when you die and 3 colors when you login, same elements) Now for some reason the warning changed to: ad argument @ spawnPlayer AND setPlayerTeam AND triggerClientEvent (expected player at argument 1 (or 2), got number '42') So instead of ''1'', it shows ''42'' meaning that the number changes, why I don't know. Not sure why it doesn't just pick player.
-
That didn't work.
-
This is what I got now: function spawnAfterDeathOrLogin(player) local acc = getPlayerAccount(source) if getAccountData(acc, "FirstLoginNow") == true then setTimer( function() if getAccountData(acc, "green") == true then setPlayerTeam(player, getTeamFromName("Special Military Unit")) spawnPlayer (player, 235.47963, 1872.47766, 11.46094, 180, 287, 0) triggerClientEvent("class", player) end if getAccountData(acc, "blue") == true then setPlayerTeam(player, getTeamFromName("People's Protection Power")) spawnPlayer (player, -176.84535, 996.75055, 23.63281, 180, 282, 0) triggerClientEvent("class", player) end if getAccountData(acc, "red") == true then setPlayerTeam(player, getTeamFromName("Ghost Mercenaries")) spawnPlayer (player, -551.11359, 2593.78394, 53.93478, 180, 285, 0) triggerClientEvent("class", player) end end, 3000, 1) end end addEventHandler("onPlayerWasted", getRootElement(), spawnAfterDeathOrLogin) addEventHandler("onPlayerLogin", getRootElement(), spawnAfterDeathOrLogin) It still doesn't work. It gives another warning now: bad argument @ spawnPlayer AND setPlayerTeam AND triggerClientEvent (expected player at argument 1 (or 2), got number '1')
-
Thanks for the help, but I think I came up with something else. However, that thing isn't working while it should. Can you guys check it? function spawnAfterLogInOrDeath() local acc = getPlayerAccount(source) if getAccountData(acc, "FirstLoginNow") == true then setTimer( function() if getAccountData(acc, "green") == true then setPlayerTeam(player, getTeamFromName("Special Military Unit")) spawnPlayer (player, -176.84535, 996.75055, 23.63281, 180, 287, 0) end if getAccountData(acc, "blue") == true then setPlayerTeam(player, getTeamFromName("People's Protection Power")) spawnPlayer (player, -176.84535, 996.75055, 23.63281, 180, 282, 0) end if getAccountData(acc, "red") == true then setPlayerTeam(player, getTeamFromName("Ghost Mercenaries")) spawnPlayer (player, -176.84535, 996.75055, 23.63281, 180, 285, 0) end end, 3000, 1) end end addEventHandler("onPlayerLogin", getRootElement(), spawnAfterLogInOrDeath) addEventHandler("onPlayerWasted", getRootElement(), spawnAfterLogInOrDeath) It says ''bad argument @ spawnplayer AND setPlayerTeam (expected player at argument 1, got nil)'' I tried player, thePlayer and source, yet nothing worked.
-
Alright, thanks.
-
setAccountData(acc, "team", green) if getAccountData(acc, "team") == green then Will this work?
-
function spawnpanel() local acc = getPlayerAccount(source) if getAccountData(acc, "FirstLoginKek", false) then triggerClientEvent(acc, "spawnpanel") setAccountData(acc, "FirstLoginKek", true) outputChatBox("works", acc, 255, 0, 0) end end addEventHandler("onPlayerLogin", getRootElement(), spawnpanel) In this code, when players join the server for the first time, they get a message with ''works''. Their account data will be set to ''FirstLoginKek'', so if they join again, they won't see the message anymore. So I tried this in my server, I did not have the accountdata, but it didn't work. The ClientEvent didn't work, and the output didn't show up. This is the first time I work with getAccountData, so I'm not sure if this is the way to use it, but yeah help would be greatly appreciated.
-
Thanks alot!!! Got a new problem. addEventHandler("onClientGUIClick", GUIEditor.button[1], function() triggerServerEvent("red", localPlayer) showCursor(false) end, false) It says ''expected element at arg2, got nil" at addEventHandler. Any help?
-
GUIEditor = { button = {}, window = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(597, 313, 734, 299, "Desert Clan Warfare - Choose a Team!", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.memo[1] = guiCreateMemo(256, 60, 219, 41, "What team would you like to join?", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(25, 163, 231, 55, "Ghost Mercenaries", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(264, 161, 217, 57, "Special Military Unit", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(489, 163, 227, 55, "People's Protection Power", false, GUIEditor.window[1]) end) function spawn() setTimer( function() guiSetVisible(GUIEditor.window[1], true) showCursor(true) end, 1000, 1) end addEvent("spawnpanel", true) addEventHandler("spawnpanel", localPlayer, spawn) Alright so how do I make it that it doesn't show when the resource starts, but when the ''spawnpanel'' event gets triggered?
-
[Zombie TDM/RPG] RN - The Zombie Invasion [English]
marty000123 replied to marty000123's topic in Servers to play on
The server is raising in playerbase. Thanks to all of you who visited my server! I'm planning on expanding into a community including multiple servers. Details can be found here: I'll keep you all updated with information (regarding the new server will be done on it's respective page) and updates/news. Media will be posted later. -
-- Server in development -- There are so many servers out there. Call of duty, simple TDM servers, it's time for a change. I will present to all of you something that has never been done before: It's time to take matters in your own hand. Time to decide who fights along you, and who fights against you. Time to make your own clan bigger than any. I present to you, Desert Clan Warfare. The server is still in a very early phase of development. Therefor please don't expect it anytime soon, but I'm aiming at releasing at least this year. I'm making plans on how to develop it exactly, and what the details exactly are. I'll post progress updates through the time if anything special happens. I've made a brief explanation about what the server exactly is. I'm continuously updating it, that's why I've wrote it in a live documents file. It can be found here: https://docs.google.com/document/d/1uCQ9VrN06DGxls28UVMBu-P-YG83UiSDDmYm-uMr-7s/edit?usp=sharing I'd love to hear your opinions, that really motivates me. Together --> Bigger --> Better. Suggestions are appreciated. Anyway, I hope to see you on the battlefield! - Marty
-
[ROLEPLAY] Las Venturas Roleplay [ENGLISH]
marty000123 replied to Tennplugg's topic in Servers to play on
Is it wrong that I assume that the players who gave this server awesome reviews have a staff rank / connection to this server? -
this topic is 8 years old
-
[ROLEPLAY] Countryside Roleplay [English]
marty000123 replied to Cronus's topic in Servers to play on
The development is stagnating at the moment, but we have our reasons. This means that the server release can be delayed by a bit (2 months max), but we're aiming to release in Q3/Q4.- 7 replies
-
- 1
-
-
- crp
- countryside
-
(and 2 more)
Tagged with:
-
Nice topic, but can I give you a small piece of advice? Hit spacebar after writing a ''.''.