• Announcements

    • jhxp

      Forums are online again after a maintenance.   18/03/17

      MTA Forums maintenance is completed, although some automatic time-heavy tasks are still in process and will be finished eventually in background. Expect some features such as Forum Search to not display all results until all processes are finished. Please let us know if you spot a forum feature that worked correctly before the maintenance but does not work anymore now. Thanks. --MTA Team
    • jhxp

      Multi Theft Auto: San Andreas 1.5.4 is out!   21/04/17

      Click the link in the announcement for more details.  

Anubhav

Members
  • Content count

    2,428
  • Joined

  • Last visited

Community Reputation

6 Neutral

1 Follower

About Anubhav

  • Rank
    Shooter

Details

  • Gang
    A-team

Recent Profile Visitors

497 profile views
  1. function OpenWindow(thePlayer) if getElementType( thePlayer ) == "player" then local _, _, mZ = getElementPosition(source) -- Marker position local _, _, pZ = getElementPosition(thePlayer) -- Player position if thePlayer == getLocalPlayer() and (getElementData(localPlayer,"Level")) <= 59 and pZ <= mZ + 3 then outputChatBox("You must be atleast Level 60 to access the Special Weapon Shop!", 255, 0, 0) else if ( guiGetVisible ( specialWshop ) == false ) and thePlayer == getLocalPlayer() then guiSetVisible ( specialWshop, true ) showCursor ( true ) end end end end addEventHandler("onClientMarkerHit", special, OpenWindow) addEventHandler("onClientMarkerHit", specialSC, OpenWindow)
  2. even that is wrong. function GetAccountNameFromSerial(player, cmd, serial) local accounts = getAccountsBySerial(serial) if accounts then for _,v in pairs(accounts) do outputChatBox(getAccountName(v)) end end end addCommandHandler("tes",GetAccountNameFromSerial)
  3. You could use one timer FOR ALL vehicles, make a luck kinda thing, so if math.random(1,2) is 1 it bursts or it doesnt (chances) getElementsByType("vehicle")
  4. Not to say the code is wrong.
  5. function presidentArrived() setTimer( function( source ) local skin = getElementModel(source) if (skin == 21) then outputChatBox("The President has arrived!", getRootElement(), 0, 120, 80, false) end end, 2500, 1, source ) end addEventHandler("onPlayerSpawn", getRootElement(), presidentArrived) Maybe your spawn script sets the skin a bit late, so I guess this should work.
  6. less players. gg server
  7. I could help you if you have discord/skype in ideas. PM me.
  8. Lol, source in that event is actually the button clicked. I'm suprised I forgot to fix that or did not even see it e.e localPlayer should be used (the player who clicked it).
  9. server sided scripts load first no matter what, its because they are on server, and server starts, and client joins and then the client sided are downloaded and read by the MTA client. so it doesnt matter if you put server type script first or not
  10. So you want the weapons on first death to be saved for all NEXT deaths?
  11. when the player fires and bullets become one, just toggleControl and play your song.
  12. ------------------------ --- Create Character --- submitCreate = guiCreateButton(0.38, 0.57, 0.30, 0.05, "Create Character", true) lblCharName = guiCreateLabel(0.47, 0.33, 0.08, 0.04, "Charactername", true) charHeight = guiCreateLabel(0.47, 0.40, 0.08, 0.04, "Height: 150 CM", true) charWeight = guiCreateLabel(0.56, 0.40, 0.08, 0.04, "Weight: 50 KG", true) charGender = guiCreateLabel(0.47, 0.47, 0.04, 0.02, "Gender:", true) charMale = guiCreateCheckBox(0.47, 0.49, 0.04, 0.02, "Male", false, true) charFemale = guiCreateCheckBox(0.52, 0.49, 0.05, 0.02, "Female", false, true) charEdit = guiCreateEdit(0.47, 0.36, 0.15, 0.03, "", true) skinGrid = guiCreateGridList(0.38, 0.33, 0.08, 0.18, true) guiGridListAddColumn(skinGrid, "Skins", 0.9) for i = 1, 3 do guiGridListAddRow(skinGrid) end guiGridListSetItemText(skinGrid, 0, 1, "1", false, false) guiGridListSetItemText(skinGrid, 1, 1, "2", false, false) guiGridListSetItemText(skinGrid, 2, 1, "3", false, false) heightScroll = guiCreateScrollBar(0.47, 0.43, 0.07, 0.02, true, true) weigthScroll = guiCreateScrollBar(0.56, 0.43, 0.07, 0.02, true, true) guiSetVisible(skinGrid,false) guiSetVisible(submitCreate,false) guiSetVisible(lblCharName,false) guiSetVisible(charHeight,false) guiSetVisible(charWeight,false) guiSetVisible(charGender,false) guiSetVisible(charMale,false) guiSetVisible(charFemale,false) guiSetVisible(charEdit,false) guiSetVisible(heightScroll,false) guiSetVisible(weigthScroll,false) ------------------------ function createCharacterFunction() if source == submitCreate then local charname = guiGetText(charEdit) if guiCheckBoxGetSelected (charMale) then local gender = "male" local skin = guiGridListGetItemText ( skinGrid , guiGridListGetSelectedItem ( skinGrid ), 1 ) triggerServerEvent("createCharacter", source, charname, gender, skin) elseif guiCheckBoxGetSelected (charFemale) then local gender = "female" local skin = guiGridListGetItemText ( skinGrid , guiGridListGetSelectedItem ( skinGrid ), 1 ) triggerServerEvent("createCharacter", source, charname, gender, skin) end end end addEventHandler("onClientGUIClick", root, createCharacterFunction)
  13. If you dont have any weapons when you die, it won't give you any weapon when you spawn, be it 1st 2nd or 3rd.
  14. I had bad luck that time I guess. It downloaded pretty fast although I got bored playing alone.
  15. I checked after 5-10 minutes and it did not.. Ill try again