Jump to content

Prat

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by Prat

  1. Hi guys today i tried to make this script, but itsn't working , i tried to delete those Team function but it works. so all i need to do is: when you do /gobase you warp to the base , /gobase only work for "staff" team only. here is the script function staffwarp (thePlayer ,command) if getTeamName(getPlayerTeam(thePlayer)) == "Staff" then setElementPosition ( thePlayer, 2454.7448730469, 1441.8331298828, 10.90625) sendClientMessage ( "You succesfuly warped to Staff Base", thePlayer, 0, 255, 0, true ) else outputChatBox ("You don't have access for this command", thePlayer, 255, 0, 0) end addCommandHandler ("gobase", staffwarp)
  2. Prat

    help please !

    Ok thanks guys, i will try it now.
  3. Prat

    help please !

    excuse me , i'm beginner and i cant understand what you said. i tried those functions above but didn't work, so i need explain on this. Thank you.
  4. Prat

    help please !

    @EstrategiaGTA Thanks for your help but it didn't work. @DNL291 it works perfectly thanks to you , i really appreciate it bro. but one more thing , i need to take 3000$ from the player who clicks "buy" the health. i will appreciate that you helped me alot
  5. Prat

    help please !

    Hello guys , today i i tried to make a gui that has 2 buttons 1 button to get 200 health costs 3k , and other to close the GUI, activating this will be through "onMarkerHit" furthermore , you can tell me what is the wrong with this and fix it Client side : GUIEditor = { button = {}, window = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(537, 244, 298, 234, "buy Health", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(9, 154, 129, 70, "Buy Health\n($3.000)", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(159, 154, 129, 70, "Close", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.label[1] = guiCreateLabel(16, 25, 262, 115, "You can buy 200 health from here.\n\n200 HP costs $3.000", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 41, 255, 0) end ) addEventHandler ( "onClientGUIClick",root, function () HealthBuy = guiCreateButton(9, 154, 129, 70, "Buy Health\n($3.000)", false, GUIEditor.window[1]) ttriggerServerEvent ( "onHealth", localPlayer ) function OpenWin() healmarker = createMarker ( 2024.6821289063, -1411.6774902344, 16.9921875,) if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) end end BindKey ("F2", "down", OpenWin) server side : addEvent ("onHealth", true) addEventHandler ("onHealth", getRootElement(), function() local = getPlayerAccount ( source ) setPedStat(source, 24, 1000) setElementHealth ( source, 200 ) end some reason stopping it from working , and hope you guys help me out on this. Thank you for reading this
×
×
  • Create New...