-
Posts
589 -
Joined
-
Last visited
Everything posted by mjau
-
Chat topicen
mjau replied to SilverSink's topic in Scandinavian (Danish / Dansk, Norwegian / Norsk, Swedish / Svenska)
er norsk jeg -
nahh not that i meant i crated a spawn panel and i want to restrict 2 spawns one for admins and another one for Army Do i have to create a acl group for army ?
-
yeah i tought about it and i will do that cuz i dont wanna make a BIG script for this small things as restriciting stuff
-
i heard that sa:mp scripting is harder mta:sa uses LUA read the wiki to learn https://wiki.multitheftauto.com/wiki/Scr ... troduction
-
no i mean a group system wich i can use to add people to groups and restrict spawn and cars to that group
-
if i want to create almost a new team system but just to addtion to teams like it desent have to show up on scoreboard i want it only for restrivting vehicles and spawns couldsomone tell me the functions i need for that
-
so still ned help with restricting the spawns .
-
Client side GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} function createthegui() showCursor(true,true) GUIEditor_Window[1] = guiCreateWindow(6,0,297,596,"Spawn menu",false) GUIEditor_Button[1] = guiCreateButton(12,24,98,43,"Adminspawn",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(176,38,88,33,"Pilot",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(16,87,89,41,"Robber",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(16,149,88,40,"Hobo",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(15,200,92,35,"Carjacker",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(17,245,88,38,"Army Rangers",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(12,288,92,40,"Arms Dealer",false,GUIEditor_Window[1]) GUIEditor_Button[8] = guiCreateButton(14,335,87,37,"Drug Dealer",false,GUIEditor_Window[1]) GUIEditor_Button[9] = guiCreateButton(13,377,88,36,"The Organisation",false,GUIEditor_Window[1]) GUIEditor_TabPanel[1] = guiCreateTabPanel(288,123,0,5,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Tab",GUIEditor_TabPanel[1]) addEventHandler("onClientGUIClick", GUIEditor_Button[1], teleportPlayer, false) addEventHandler("onClientGUIClick", GUIEditor_Button[6], armyspawn, false) end function openTeleportWindow() createthegui() end addCommandHandler("teleportme",openTeleportWindow) function teleportPlayer(button,state) if button == "left" and state == "up" then triggerServerEvent("movePlayerToPosition",getLocalPlayer(),1479.6,-1612.8,14.0,69) closeWindow() removecursor() end end function armyspawn(button,state) if button == "left" and state == "up" then triggerServerEvent("movePlayerToPosition",getLocalPlayer(),207.00390625,1865.75390625,13.140625,0,287) closeWindow() removecursor() end end function closeWindow() destroyElement(GUIEditor_Window[1]) end function removecursor() showCursor ( false ) end Server side function moveThePlayer(x,y,z,rotation,skin) if x and y and z and rotation and skin then spawnPlayer(source,x,y,z,rotation,skin) setCameraTarget(source,source) end end addEvent("movePlayerToPosition",true) addEventHandler("movePlayerToPosition",root,moveThePlayer)
-
Fuck hell ill upload my whole code now my adminspawn button dont work
-
like i create a table with the accounts wich are allowed to spawn and the script reads that table I hate tables so give me a start ore sumething
-
oh and how do i restrict it to the players i choose or what do i need to do that
-
hmm now it swaps over to the army skin and fast back to the skin i were using i can barely see it swaps before it goes back
-
shall i add it serverside and how cuz that skin is for one button of the gui i made and i dont want that skin to be in every spawn
-
A bit of client side function armyspawn(button,state) if button == "left" and state == "up" then triggerServerEvent("movePlayerToPosition",getLocalPlayer(),207.00390625,1865.75390625,13.140625,0) closeWindow() removecursor() armyskin(thePlayer) end end function armyskin(thePlayer) setElementModel ( thePlayer, 287 ) end And my Serverside function moveThePlayer(x,y,z,rotation) if x and y and z and rotation then spawnPlayer(source,x,y,z,rotation,skin) setCameraTarget(source,source) end end addEvent("movePlayerToPosition",true) addEventHandler("movePlayerToPosition",root,moveThePlayer)] It wont change the skin
-
oke i mean like in squared area not a point
-
Hey can somone please tell me the functions i need to put music in a area i choose because i made a club i put it under the whole SA world what functions do i need to choose that area to play music
-
GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} function createthegui() showCursor(true,true) GUIEditor_Window[1] = guiCreateWindow(6,0,297,596,"Spawn menu",false) GUIEditor_Button[1] = guiCreateButton(12,24,98,43,"Adminspawn",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(176,38,88,33,"Pilot",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(16,87,89,41,"Robber",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(16,149,88,40,"Hobo",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(15,200,92,35,"Carjacker",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(17,245,88,38,"Army Rangers",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(12,288,92,40,"Arms Dealer",false,GUIEditor_Window[1]) GUIEditor_Button[8] = guiCreateButton(14,335,87,37,"Drug Dealer",false,GUIEditor_Window[1]) GUIEditor_Button[9] = guiCreateButton(13,377,88,36,"The Organisation",false,GUIEditor_Window[1]) GUIEditor_TabPanel[1] = guiCreateTabPanel(288,123,0,5,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Tab",GUIEditor_TabPanel[1]) addEventHandler("onClientGUIClick", GUIEditor_Button[1], teleportPlayer, false) addEventHandler("onClientGUIClick", myCloseButton, closeWindow, false) -- change myCloseButton to your close button element. end function openTeleportWindow() createthegui() end addCommandHandler("teleportme",openTeleportWindow) function teleportPlayer(button,state) if button == "left" and state == "up" then triggerServerEvent("movePlayerToPosition",getLocalPlayer(),1479.6,-1612.8,14.0,0) end end function closeWindow() if button == "left" and state == "up" then destroyElement(GUIEditor_Window[1]) end end