Jump to content

Ab-47

Members
  • Posts

    367
  • Joined

  • Last visited

Everything posted by Ab-47

  1. Took me a while figuring out what went wrong lol! Fixed: addEvent("selectedOne", true) addEventHandler("selectedOne", root, arenaOneHandler) you had this before: addEvent("selectedOne", true) addEventHandler("seletedOne", root, arenaOneHandler) I bolted your error. Silly mistake
  2. Just realized, it's a server side function, try using a player argument: bindKey(player, "key", "down", theGUIshow) for i.e: bindKey(player, "f1", "down", theGUIshow)
  3. I hear using tables is much more easier and more dependable. I'd suggest tables, or if you want a temp data, use setElementData, in-case you want permanent data until the data variable has changed, use setAccountData
  4. Ab-47

    Need help, SKIN

    Try search YouTube on tutorials and try yourself if you need help in the engine replacements, contact us here, thanks.
  5. But I don´t know where I should place "bindKey" Okay, I changed that. Replace: addCommandHandler("vip",theGUIshow) with: bindKey("key", "down", theGUIshow) Make sure you replace "key" with your key such as "f1", "f2", "a", "b", etc. for i.e: bindKey("f1", "down", theGUIshow)
  6. Ab-47

    Help Scripting

    Simply learn to save the files and meta files, and where to save them. The wiki is stated above, with a whole section just for scripting with functions/events etc. The great thing is, it also gives examples. Take an example, save the script and try it out IG your local server or such. Then try tweaking those scripts changing variables etc, read all about it's functionality on it's function page. A little practice can get you started.
  7. Ab-47

    Anim Scoreboard!

    When I make animating GUI's I use: InterpolateBetween https://wiki.multitheftauto.com/wiki/InterpolateBetween Maybe try that?
  8. Ab-47

    The last reply

    Don't feel like that, I'm truly inspired by you and I don't care about any relation you have with anyone I gotcha back bro
  9. Can you please show me the script you're trying to make, where the actual expected bad argument is, thanks. I will send u the script in pm. Thats why lol, you were meant to call the function by it's name, replacing "function" in "setTimer(function, 90000, 1)" What do you want to call? If the respawn script, use setTimer(respawn, 90000, 1) or if it's the check empty function you want to call then: setTimer(checkEmpty, 90000, 1)
  10. Can you please show me the script you're trying to make, where the actual expected bad argument is, thanks.
  11. local player = getLocalPlayer() if(AFKtime >= MaxAFKtime) then if (afkCounter <= 4) then triggerServerEvent ( "afkWarn", player, 1, afkCounter) afkCounter = afkCounter+1 triggerServerEvent ( "afkSlap", root, player) stopWarn() Try now. You cannot get the vehicle of "root." root = rootElement, the function is being triggered across file types, I think root is moreover recommended. We aren't stating the vehicle in this side of the function, that all comes on the other file.
  12. Lol, if you were smart enough, you would've noticed that. You seem to still not be comprehending our language, it was moved after "Vortex | Brant" had posted. Hope you can understand that not sure how else we can explain it to you... Aright guys, I think we get the point now, no point fighting about it. kthnx
  13. local player = getLocalPlayer() if(AFKtime >= MaxAFKtime) then if (afkCounter <= 4) then triggerServerEvent ( "afkWarn", player, 1, afkCounter) afkCounter = afkCounter+1 triggerServerEvent ( "afkSlap", root, player) stopWarn() Try now.
  14. Give it an attempt and post your results here, we'll be sure to help you. After all it's what this board is about.
  15. Unless you want to define it, such as: local vehicle = getPedOccupiedVehicle(localPlayer), then: if (vehicle == "vehicleModel") then. Else this function goes to every single vehicle. For setTimer it should look like this: setTimer(function, 90000, 1)
  16. Ab-47

    V.I.P GUI

    Here, make things easier for yourself --Server: local VIP = {} local VIPmembers = { {"accountName"}, } function addVIPs() for i, plr in pairs(getElementsByType("player")) do for index, VIP in pairs(VIPmembers) do local accountname = getAccountName(getPlayerAccount(plr)) if (accountname == VIP[1]) then setElementData(plr, "VIP", true) VIP[plr] = true end end end end addEventHandler("onResourceStart", resourceRoot, addVIPs) function onloginAddVIP() for i, VIP in pairs(VIPmembers) do local accountname = getAccountName(getPlayerAccount(source)) if (accountname == VIP[1]) then VIP[source] = true outputChatBox("You have logged in as a VIP", source, 0, 255, 0) setElementData(source, "VIP", true) end end end addEventHandler("onPlayerLogin", root, onloginAddVIP) function fullArmor() giveWeapon (source, 36, 5) end addEvent ("newArmor",true) addEventHandler ("newArmor",getRootElement(),fullArmor) function setVIPSkin() setElementModel ( source, "50" ) end addEvent("VIPskin",true) addEventHandler("VIPskin",getRootElement(),setVIPSkin) function spawnCar() if ( not isPedInVehicle ( source ) ) then local x, y, z = getElementPosition ( source ) veh = createVehicle ( 541, x + 3, y, z ) warpPedIntoVehicle (source, veh) end end addEvent("vehicleSpawn",true) addEventHandler("vehicleSpawn",getRootElement(),spawnCar) function jetPack() if ( not isPedInVehicle ( source ) ) then if ( not doesPedHaveJetPack ( source ) ) then givePedJetPack ( source ) outputChatBox ( "You now have jetpack.", source ) else removePedJetPack ( source ) outputChatBox ( "You have removed your jetpack.", source ) end end end addEvent("jetpackOnAndOff",true) addEventHandler("jetpackOnAndOff",getRootElement(),jetPack) function fixTheVehicle( vehicle ) if isPedInVehicle ( source ) then fixVehicle(getPedOccupiedVehicle(source)) end end addEvent("fixMyVehicle", true) addEventHandler("fixMyVehicle",getRootElement(),fixTheVehicle) -- Client: GUIEditor = { button = {}, window = {}, label = {} } local x, y = guiGetScreenSize() GUIEditor.window[100] = guiCreateWindow(-3, 0, 742, 212, "WWZ V.I.P Panel", false) guiWindowSetMovable(GUIEditor.window[100], true) guiWindowSetSizable(GUIEditor.window[100], false) guiSetVisible(GUIEditor.window[100], false) Button1 = guiCreateButton(21, 27, 172, 66, "Give 5 Heatseeker Rockets", false, GUIEditor.window[100]) Button2 = guiCreateButton(247, 49, 223, 102, "Play as Roman Bellic", false, GUIEditor.window[100]) Button3 = guiCreateButton(524, 141, 172, 61, "Spawn Bullet", false, GUIEditor.window[100]) Button4 = guiCreateButton(524, 26, 172, 66, "Jetpack", false, GUIEditor.window[100]) Button5 = guiCreateButton(21, 141, 172, 61, "Repair Current Vehicle", false, GUIEditor.window[100]) GUIEditor.label[1] = guiCreateLabel(263, 24, 291, 15, "Choose any of the VIP options", false, GUIEditor.window[100]) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == Button1 ) then triggerServerEvent("newArmor",getLocalPlayer()) elseif ( source == Button2 ) then triggerServerEvent("VIPskin",getLocalPlayer()) elseif ( source == Button3 ) then triggerServerEvent("vehicleSpawn",getLocalPlayer()) elseif ( source == Button4 ) then triggerServerEvent("jetpackOnAndOff", getLocalPlayer()) elseif ( source == Button5 ) then triggerServerEvent("fixMyVehicle",getLocalPlayer()) end end ) function show() if (getElementData(source, "VIP") == true) then if guiGetVisible(GUIEditor.window[100]) == true then guiSetVisible(GUIEditor.window[100], false) showCursor(false) guiSetInputEnabled(false) else guiSetVisible(GUIEditor.window[100], true) showCursor(true) guiSetInputEnabled(true) end end end addCommandHandler("vipGUI", show) bindKey("F7", "down", show) Simply add players account names inbetween the brackets in the table, restart the resource and they're VIP. For i.e, I want more accounts in the table,do this: local VIPmembers = { {"accountName"}, {"accountName2"}, {"accountName3"}, {"accountName4"}, } Have fun.
  17. I defined "plr" and re-wrote the check to see if the player is not a criminal to be able to enter any vehicle. You can simply change the occupation or change the check, here: function myFunc(plr) if (getElementData(plr, "Occupation") == "Criminal") then outputChatBox("You cannot enter this vehicle as a criminal", plr, 255, 0, 0) cancelEvent() return end end addEventHandler("onVehicleStartEnter", root, myFunc)
  18. Ab-47

    The last reply

    Jaysds1 is a true Hopeless Forum Addict xDDDD
  19. I don't know about your map editor and for your excess questions: 1) Yes it is, add a check to see which player is "trying" to enter the vehicle using the event: onVehicleStartEnter for example: function myFunc() if (not getElementData(source, "Occupation") == "Criminal") then outputChatBox("You cannot enter this vehicle, unless you're a criminal", source, 255, 0, 0) return end end addEventHandler("onVehicleStartEnter", root, myFunc) 2) Using setTimer, yes you can. setTimer(thingyouwanttocallhere, 900000, howmanytimesyouwanttocallit) -- if 1000 = 1 second then 1000*60=1minute, ans*15=15 mins.
  20. Ab-47

    help

    I don't understand your needs, maybe: local posx, posy, posz = getElementPosition(localPlayer) setElementPosition(localPlayer, posx + 2, posy + 2, posz)
  21. Actually it's impossible to collect data without knowing if the players logged in or not, hence no account defined. Use "onPlayerLogin"
  22. Ab-47

    help

    createObject moveObject onColShapeHit Required arguments, if what you mean by "PUSH", I assume a player entering a col-shape and the object moving? Otherwise it depends on the typical GTA objects, if they're not stable.
  23. thnx, I used your serversided function, that what I needed x.x I used F7 to show/~ the gui If you do experience everyone viewing the GUI in your server, you could add an extra argument before the event. "triggerClientEvent ( "startWindow", source )" > " triggerClientEvent ( source, "startWindow", root source ) or something like that.
  24. Afaik, you could use map editor to find the list of all object ID's with the ability to place/move/re-size/delete etc. That might help you.
  25. Maybe this could help: getElementInterior Try something like this to get the players interior: local interior = getElementInterior(thePlayer) outputChatBox("This player is in interior:"..interior, thePlayer, 255, 255, 0)
×
×
  • Create New...