Baseplate
Members-
Posts
1,417 -
Joined
-
Last visited
Everything posted by Baseplate
-
Uhm not workin and both of those teams are already created
-
bad argument @ 'setPlayerTeam' and bad argument @ 'setElementData' [Expected Element at argument 1, got nil] server sided errors
-
Client-side: 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) funtion teamResign() if (source == rebutton) then triggerServerEvent ("onPlayerCliking",getLocalPlayer()) end addEventHandler("onButtonClick", Resign, teamResign ) funtion teamOff() if (source == offbutton) then triggerServerEvent ("onPlayerClikin",getLocalPlayer()) end addEventHandler("onButtonClick", Go Off Duty, teamOff ) Server: 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 )
-
local root = getRootElement() local rootChildren = getElementChildren( root ) function createTeamsOnStarts () teamBlue = createTeam ( "Blue", 0, 0, 22 ) teamRed = createTeam ( "Red", 255, 0, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStarts ) function setTeams ( player ) setPlayerTeam ( player, teamBlue) giveWeapon ( player, 34, 10000 ) giveWeapon ( player, 35, 3 ) giveWeapon ( player, 17, 5) giveWeapon ( player, 29, 10000 ) giveWeapon ( player, 30, 1000 ) giveWeapon ( player, 31, 1000 ) end addEvent("onPlayerClikin", true) addEventHandler("onPlayerClikin", root, setTeams ) function setTeam ( player ) setPlayerTeam ( player, teamRed) giveWeapon ( player, 34, 10000 ) giveWeapon ( player, 36, 3 ) giveWeapon ( player, 39, 5) giveWeapon ( player, 29, 10000 ) giveWeapon ( player, 30, 1000 ) giveWeapon ( player, 31, 1000 ) end addEvent("onPlayerCliking", true) addEventHandler("onPlayerCliking", root, setTeam ) function abc (hitElement) triggerClientEvent (hitElement,"Select",getRootElement()) end end addEventHandler ("onPlayerLogin", root, abc ) Untested check it
-
Well, I don't believe you'd find one here, they're surely busy in their own projects
-
addEventHandler("onPlayerChat",root, function(msg) cancelEvent() local playerTeam = getPlayerTeam( source ) local r, g, b = getTeamColor( playerTeam ) localPlayer = getPlayerFromName ( msg ) local x,y,z = getElementPosition ( source ) local zone = getZoneName(x,y,z,true) local curZone if zone=="Los Santos" then curZone = "LS" elseif zone == "Las Venturas" then curZone = "LV" elseif zone == "San Fierro" then curZone = "SF" else curZone = zone end outputChatBox("("..curZone..")"..getPlayerName(source)..":"..msg) end)
-
I've fixed the script anyways..i'll see about this now
-
You forgot to get the player jay now it dosen't get my team color in the chat, how to?
-
Well, I wanted to know how to add the city name behind the playername when he types something e.g: (LS)Samer:Hello
-
There is a server called Badwolf before, you need their permission and you can do more mate..
-
Okay lemme check function kay (thePlayer) givePlayerMoney (thePlayer, 100) setTimer(kay, 300000, 1) end addEventHandler ("onPlayerSpawn", root, kay) Try this, untested
-
Meh, I forgot anyways.
-
function kay (source) givePlayerMoney (source, 100) setTimer(kay, 300000, 1) end addEventHandler ("onPlayerSpawn", root, kay) Not sure/untested but I think that's what u want
-
Oh okay, thanks! EDIT: but when you use /kill does it freeze everyone
-
Okay thanks, but a question about root, does it freeze everyone or just the player?
-
Howdy crap! Freeroam was running lololol thanks mate Okay, now I want the player to be frozen when he do /kill and when he respawns he gets unfreezed but I have probs with the event handler, code addCommandHandler('kill', function(p) setTimer(killPed, 5000, 1, p) setElementFrozen (p, true) outputChatBox ( "You'll die in 5 seconds!", p, 255, 255, 255, false ) end ) function unfreeze (p) setElementFrozen (p, false) end addEventHandler ("onPlayerRespawn", p, unfreeze)
-
That's to set an element frozen, I wanna make it kills u after 5 seconds. that's all lol
-
Still bugged mate kills u right away and when I move i get killed, no debug errors
-
1.Search for a free host on forums 2.Check on Community 3.Show ur code 4.go to ur mtaserver.conf and change ur fps limit there to ur desired FPS limit 5.Good luck
-
Dosen't work Move and u die, and it kills u right away
-
I agree with Anderl in this, opinions should be always posted, maybe a Hosting Company dosen't give a good service to its customers, so they warn people before choosing it
