Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by CobbTheWarriorsRPG

  1. Wow, i understand A LOT of things now!, Really thanks @Investor!!!!, and what do you think about my way to trigger and save the Seller user? i dont know if it is the best way to sync the players. i do it attaching the seller to a marker and later ask if isElementAttachedTo, i dont know how to sync 2 or more users. For example, in the server event "onPlayerDamage" i got 2 users, the source(the guy who gets the damage) and the attacker, i want to know if is a best way to make the way to sync seller and buyer or my way is a good idea !, Thank you very much for the explanation, really really app
  2. Hello everyone, I am trying to design a script for selling drugs, I have 6 types of drugs, which have names in Spanish, they are saved through the setElementData and setAccountData of each user. To make my drug sales system, the buyer attaches himself to the marker, so he can reference it later when calling other events and get all his information, then when the buyer hits the marker he obtains the information of the seller through the getElementData of the marker and the buyer obtain the seller who is attached to the marker. At the moment I only made the sale of a drug, the "Bareta" (We
  3. Good morning everyone, I'm trying to make a script to sell drugs, the drugs are stored in the account Data and elements Data of each player, I want to define a marker that when the other user (Buyer) enters the marker, he opens the window of purchases and see the prices that the seller previously defined, I do not know how to synchronize this interaction with two users, buyer and seller, many thanks! Server Side: function drug( ) local x, y, z = getElementPosition ( source ) marker = createMarker ( x, y, z-1, "cylinder", 1.5, 255, 255, 0, 170 ) end addEvent( "onClick", tr
  4. @Callum, it happends in FreeRoam, and i change my skin in the Admin panel, some help? thanks!
  5. I think it doesnt work because the markers got created when you click on a gui and it trigger to server see the code function serverStartBank(p,character) model = getElementModel(p) setTimer( function() fadeCamera ( p, false, 1.0, 0, 0, 0 ) setTimer ( fadeCameraDelayed, 1000, 1, p ) setTimer( function() setElementPosition(p, 388.89999389648, 173.5, 1008.4000244141) setElementModel ( p, character ) setElementDimension(p, 200) setElementInterior(p, 3) doorBank = createObject(295
  6. bad argument #1 to ipairs ( table expected, got nil)
  7. So, i can call it when i define the function whit the event handler onMarkerHit? like function exampleFunction() outputChatBox("You are in the Marker1") addEventHandler("onMarkerHit", Marker1, exampleFunction Thanks!
  8. Oh thanks! but if someone hit for example the first marker how can i define it for destroy only these marker? really thanks carim
  9. Good Day to all, im trying to make a loop for a markers,these markers are in a table, but only appears 1... see my code, a lot of thanks markers = { createMarker(345.52288818359, 165.7333984375, 1014.1875, "cylinder", 1.5, 255, 255, 0, 150), createMarker(347.45263671875, 167.09187316895, 1007.3828125, "cylinder", 1.5, 255, 255, 0, 150), createMarker(349.38757324219, 167.09187316895, 1007.3828125, "cylinder", 1.5, 255, 255, 0, 150), createMarker(349.40020751953, 167.09187316895, 1007.3828125, "cylinder", 1.5, 255, 255, 0, 150), createMarker(
  10. Wel, its simply. Im ussing setElementModel for change a player skin, but when it change the model i lose all my weapons, how can i fix this error? a lot of thanks!
  11. function storeLastPage() lastPage = getBrowserURL ( brow1 ) outputChatBox(""..lastPage.."") end addEventHandler("onClientBrowserNavigate", brow1, storeLastPage) It works but when it wants and when i navigate it gives to me 3 times the web page in debug https://www.google.com.co/?gfe_rd=cr&ei ... gws_rd=ssl https://www.google.com.co/?gfe_rd=cr&ei ... gws_rd=ssl https://www.google.com.co/?gfe_rd=cr&ei ... gws_rd=ssl
  12. Something like this? function SpawnPicks ( ) if ( not pickup ) then pickup = createPickup(x,y,z,3,id,3) addEventHandler ( "onPickupHit", pickup, onPickupHit ) end end addEventHandler ( "onResourceStart", resourceRoot, SpawnPicks ) function onPickupHit ( ) if isElement ( pickup ) then destroyElement ( pickup ) setTimer ( function() SpawnPicks() outputChatBox ( "Pickup created" ) end, 5000, 1 ) end pickup = nil end
  13. Well, i am making a browser, i want to do the back button, store the last page in a variable and when you click the back button return to the last page, see the code it doesnt work function storeLastPage() lastPage = getBrowserURL ( brow1 ) function returnLast() loadBrowserURL(brow1, lastPage) end addEventHandler("onClientGUIClick", backBtn, returnLast, false) end addEventHandler("onClientBrowserNavigate", brow1, storeLastPage)
  14. Try to give to them a Shotgun or an m4 and you will see hahaha
  15. Well, bot its not an element, but you can create a ped like this https://wiki.multitheftauto.com/wiki/CreatePed function cash () local bot = createPed ( 0, 0, 0, 0)--Create a Cj in the 0,0,0 coord local cash = getElementData(bot, "cash") --This return false, because the bot doesnt have "cash" outputChatBox("BOT have "..cash.."$ !", getRootElement(), 255, 0, 0, true) end addCommandHandler("xxx", cash) function cash2 () --You cant operate booleans whit numbers so cash = getElementData(bot,"cash") if (cash == false) then --You cant operate booleans whit numbers so setElementData
  16. Yes!, whit this resource you can do it its called "slothbot" https://community.multitheftauto.com/in ... ils&id=672 And see how to use it here http://wiki.multitheftauto.com/wiki/Slothman/Slothbot
  17. Yeah, but if i put eg: facebook.com the web page will be in blank, some help? thanks
  18. Hello all, i am using an example of the wiki, my question is, why if i change the loadBrowserURL it doesnt work?, just work on youtube, thanks! --In order to render the browser on the full screen, we need to know the dimensions. local screenWidth, screenHeight = guiGetScreenSize() --Let's create a new browser in remote mode. local window = guiCreateWindow(0, 0, screenWidth, screenHeight, "Webbrowser", false) local browser = guiCreateBrowser(0, 0, 800, 600, false, false, false, window) -- The event onClientBrowserCreated will be triggered, after the browser has been initialized. -
  19. Hi, I'm trying to make a resource to check if you are admin you can give values to the account of a player, but not work for me, I need help! thank you very much --Server Side: addCommandHandler("rechargemp", function (player, cmd, torecharge, ammount) local tocargaAccount = getAccountPlayer ( torecharge ) local accountname = getPlayerAccount ( player ) if isObjectInACLGroup ( "user.".. accountname, aclGetGroup ( "Admin" ) ) then --If you are admin you can give medalloPoints To the player account outputChatBox("You give "..ammount.." to "..torecharge.."") setAccountData( a
  • Create New...