Jump to content

swag_k_dog

Members
  • Posts

    100
  • Joined

  • Last visited

Everything posted by swag_k_dog

  1. @Dutchman101 okay man, can you please explain how to add my custom wrap to an elegy? and what does F2 do? I didnt really understand anything after reading the topic + comments, thanks. I am really sorry if I am too dumb..
  2. local Me = getLocalPlayer() backpack = createObject(371,0,0,-111) hat = createObject(954, 0, 0, -111) exports.bone_attach:attachElementToBone(backpack,Me,3,0,-0.15,-0.0,0,0,0) exports.bone_attach:attachElementToBone(hat,Me,1,0,0.05,-0.56,0,0,0) the objects attached to the player are only visible to me, not my friend that is on the server. help? ( he sees them too but on his character)
  3. function openIventory(button, press) if button == "i" then showCursor(true) invWindow = guiCreateWindow(0.00, 0.00, 1.00, 1.00, "", true) guiWindowSetMovable(invWindow, false) guiWindowSetSizable(invWindow, false) guiSetAlpha(invWindow, 1.00) guiSetProperty(invWindow, "CaptionColour", "6CFEFEFE") invText = guiCreateLabel(0.01, 0.08, 0.12, 0.05, "Inventory", true, invWindow) local font0_invfont = guiCreateFont(":guieditor/fonts/invfont.ttf", 20) guiSetFont(invText, font0_invfont) guiLabelSetColor(invText, 240, 249, 5) mainWep = guiCreateButton(0.01, 0.16, 0.12, 0.08, "Main Weapon", true, invWindow) local font1_secondfont = guiCreateFont(":inventory/secondfont.ttf", 10) guiSetFont(mainWep, font1_secondfont) guiSetProperty(mainWep, "NormalTextColour", "FEFEFFFF") secWep = guiCreateButton(0.01, 0.30, 0.12, 0.08, "Secondary Weapon", true, invWindow) guiSetFont(secWep, font1_secondfont) guiSetProperty(secWep, "NormalTextColour", "FFFEFEFE") specWep = guiCreateButton(0.01, 0.43, 0.12, 0.08, "Special Weapon", true, invWindow) guiSetFont(specWep, font1_secondfont) guiSetProperty(specWep, "NormalTextColour", "FFFEFEFE") cosmOne = guiCreateButton(0.34, 0.16, 0.12, 0.08, "Cosmetic", true, invWindow) guiSetFont(cosmOne, font1_secondfont) guiSetProperty(cosmOne, "NormalTextColour", "FEFEFEFE") cosmTwo = guiCreateButton(0.34, 0.30, 0.12, 0.08, "Cosmetic", true, invWindow) guiSetFont(cosmTwo, font1_secondfont) guiSetProperty(cosmTwo, "NormalTextColour", "FFFEFEFE") cosmThree = guiCreateButton(0.34, 0.43, 0.12, 0.08, "Cosmetic", true, invWindow) guiSetFont(cosmThree, font1_secondfont) guiSetProperty(cosmThree, "NormalTextColour", "FFFEFEFE") btnClose = guiCreateButton(0.88, 0.94, 0.10, 0.05, "Close", true, invWindow) local font2_invfont = guiCreateFont(":guieditor/fonts/invfont.ttf", 10) guiSetFont(btnClose, font2_invfont) end function closeInv() destroyElement(invWindow) showCursor(false) end addEventHandler("onClientGUIClick", btnClose, closeInv) addEventHandler("onClientKey", root, openInventory) end invWindow should open up when I press i. it doesnt. why?
  4. I have imported a teamfortress 2 hat to Blender and exported it as a dff file for MTA. I have the texture file but I don't know how to link it with the dff. I know how to replace both the model and the texture of a default GTA Object, but I cant add the texture to the dff model. help?
  5. i'll try it tomorrow because I dont have someone to test with. my friend went to bed
  6. so I made this clientside: local missionMarker = createMarker(2153, -1799, 12.5, "cylinder", 1.1, 255, 0, 0, 100) local player = getLocalPlayer() function missionGui() missionName = guiCreateLabel(0.64, 0.85, 0.38, 0.13, "sweet buisness", true) local font0_gtasanandreas = guiCreateFont(":freeroam_login/images/gtasanandreas.ttf", 50) guiSetFont(missionName, font0_gtasanandreas) guiLabelSetColor(missionName, 252, 226, 81) end addEventHandler("onClientResourceStart", resourceRoot, missionGui) addEventHandler("onClientResourceStart", resourceRoot, function() guiSetVisible(missionName, false) end) function markerhit (player, missionMarker) guiSetVisible(missionName, true) fadeCamera(false,1.3) setTimer(fadeCamera,3000,1,true) setTimer(guiSetVisible,5500,1,missionName, false) end addEventHandler("onClientMarkerHit", missionMarker, markerhit) it works fine BUT. when my friend walks in the marker, the fadeCamera and guiSetVisible apply to me too. when I walk in it, it applies to him. How do I make it to work only for the person that walks in the marker? god thanks...
  7. no sir okay motherf*ckers I finnaly did it: local missionMarker = createMarker(2153, -1799, 12.5, "cylinder", 1.1, 255, 0, 0, 100) local player = getLocalPlayer() function missionGui() missionName = guiCreateLabel(0.64, 0.85, 0.38, 0.13, "sweet buisness", true) local font0_gtasanandreas = guiCreateFont(":freeroam_login/images/gtasanandreas.ttf", 50) guiSetFont(missionName, font0_gtasanandreas) guiLabelSetColor(missionName, 252, 226, 81) end addEventHandler("onClientResourceStart", getRootElement(), missionGui) addEventHandler("onClientResourceStart", getRootElement(), function() guiSetVisible(missionName, false) end) function markerhit (player, missionMarker) guiSetVisible(missionName, true) end addEventHandler("onClientMarkerHit", missionMarker, markerhit) thanks for your help anyways @Miika822 @iPrestege @MR.S3D
  8. yes there is a message: Data in the client has been created. meta: <meta> <info author="square" name="mission" version="1.0" type="script"/> <script src="c_spawns.lua" type="client"/> <script src="s_spawns.lua" type="server"/> </meta>
  9. when I enter the marker nothing happens
  10. still no.. I tried in 123234 ways.
  11. sadly, none of these work. can someone make a simple script that opens a window on marker hit ? I will change it to a label I just need a model.. god.
  12. server: local missionMarker = createMarker(2153, -1799, 12.5, "cylinder", 1, 255, 0, 0) function triggerTheEvent() triggerClientEvent("onTheDamnWindow", resourceRoot) end addEventHandler("onMarkerHit", missionMarker, triggerTheEvent) client: addEvent("onTheDamnWindow", true) addEventHandler("onTheDamnWindow", resourceRoot, function () missionName = guiCreateLabel(0.64, 0.85, 0.38, 0.13, "sweet buisness", true) local font0_gtasanandreas = guiCreateFont(":freeroam_login/images/gtasanandreas.ttf", 50) guiSetFont(missionName, font0_gtasanandreas) guiLabelSetColor(missionName, 252, 226, 81) end ) when you hit the marker, the Label should be created. but it doesnt work grrrrrrr, why??
  13. is it possible to make Peds,Vehicles and Objects visible only to a player I choose? or a player who triggers a function
  14. Okay so I wrote the code like this: client: addEventHandler("onClientResourceStart", resourceRoot, function() mainWindow = guiCreateWindow(0.05, 0.08, 0.89, 0.83, "", true) guiWindowSetMovable(mainWindow, false) guiWindowSetSizable(mainWindow, false) guiSetAlpha(mainWindow, 0.90) mainImage = guiCreateStaticImage(845, 18, 367, 611, ":freeroam_login/images/chick.png", false, mainWindow) mainText = guiCreateLabel(0.01, 0.04, 0.68, 0.13, "Welcome to San Andreas Online. This is a pre-alpha preview of the server.", true, mainWindow) playButton = guiCreateButton(0.88, 0.93, 0.12, 0.06, "PLAY", true) setCameraMatrix(1945, -1690, 67, 1902, -1602, 13) setPlayerHudConponentVisible("all", false) showCursor(true) showChat(false) end ) function buttonPress(btn, state) if btn == "left" and state == "up" then if source == playButton then triggerServerEvent("spawnPlayerPos", resourceRoot) destroyElement(mainWindow) destroyElement(playButton) end end end addEventHandler("onClientGUIClick", resourceRoot, buttonPress) and server: addEvent("spawnPlayerPos", true) addEventHandler("spawnPlayerPos", resourceRoot, function() showCursor(source, false) showChat(source, true) setPlayerHudComponentVisible(source, "all", true) setElementPosition(source, 2245.70, -1260.03, 25.9) setElementFrozen(source, false) setCameraTarget(source) end ) and it still does not work. the show hud false does not work. the hidechat does not work. and the showCursor true doesnt work either for the client script. welp?
  15. so I made a window script to open when people join client: addEventHandler("onClientResourceStart", resourceRoot, function() triggerServerEvent("noMoreHud", root) mainWindow = guiCreateWindow(0.05, 0.08, 0.89, 0.83, "", true) guiWindowSetMovable(mainWindow, false) guiWindowSetSizable(mainWindow, false) guiSetAlpha(mainWindow, 0.90) mainImage = guiCreateStaticImage(845, 18, 367, 611, ":freeroam_login/images/chick.png", false, mainWindow) mainText = guiCreateLabel(0.01, 0.04, 0.68, 0.13, "Welcome to San Andreas Online. This is a pre-alpha preview of the server.", true, mainWindow) playButton = guiCreateButton(0.88, 0.93, 0.12, 0.06, "PLAY", true) setCameraMatrix(1945, -1690, 67, 1902, -1602, 13) end ) function buttonPress(btn, state) if btn == "left" and state == "up" then if source == playButton then triggerServerEvent("spawnPlayerPos", root) destroyElement(mainWindow) destroyElement(playButton) end end end addEventHandler("onClientGUIClick", resourceRoot, buttonPress) server: addEvent("noMoreHud", true) addEventHandler("noMoreHud", resourceRoot, function() showCursor(source, true) showChat(source, false) setPlayerHudComponentVisible(source, "all", false) end ) addEvent("spawnPlayerPos", true) addEventHandler("spawnPlayerPos", resourceRoot, function() showCursor(source, false) showChat(source, true) setPlayerHudComponentVisible(source, "all", true) setElementPosition(source, 2245.70, -1260.03, 25.9) setElementFrozen(source, false) setCameraTarget(source) end ) I wanted when someone joins the server, the server script functions only apply to that someone. but when my friend joined the server, the function which hides my hud and makes the cursor visible applied to me too. how do I make the function only for him and not for the whole server? I want the server functions to apply to the player that joined the server. not the whole server thanks.
×
×
  • Create New...