Jump to content

-misterX-

Members
  • Posts

    78
  • Joined

  • Last visited

Everything posted by -misterX-

  1. -misterX-

    dxDrawText

    what's wrong? hte console doesn't reort anything! local marker = createMarker( 1552.4996337891, -1677.3264160156, 15.1953125, "Cylinder", 1.5, 0, 0, 255, 150) local marker1 = createMarker( -1604.5458984375, 712.25848388672, 12.8671875, "Cylinder", 1.5, 0, 0, 255, 150) local marker2 = createMarker( 2340.9245605469, 2456.0463867188, 13.96875, "Cylinder", 1.5, 0, 0, 255, 150) dxDrawText("police job", 1552.4996337891, -1677.3264160156, 15.1953125, tocolor(0, 0, 0, 200), 2-(distance/20), "arial", "center", "center") dxDrawText("police job", -1604.5458984375, 712.25848388672, 12.8671875, tocolor(0, 0, 0, 200), 2-(distance/20), "arial", "center", "center") dxDrawText("police job", 2340.9245605469, 2456.0463867188, 13.96875, tocolor(0, 0, 0, 200), 2-(distance/20), "arial", "center", "center")
  2. two things... 1) the console reports bad argument on setElementData 2) it says error to concatenate on the second warnText function addACLGroupObject ( thePlayer, cmd, invitedPlayer) if not invitedPlayer then -- print out message to chatbox return warnText("Error syntax: /invite ") end local inviterGroup = getElementData(thePlayer, "group") local invitedOne = getPlayerFromName(invitedPlayer) setElementData(invitedOne, "invitedTo", inviterGroup) warnText("you invited"..invitedPlayer, thePlayer) warnText("you has been invited to: " ..inviterGroup.. "by: " ..getPlayerName(thePlayer), thePlayer) end addCommandHandler ( "invite", addACLGroupObject )
  3. -misterX-

    if not

    sorry i could have explaind you better, my bad! thanks!
  4. -misterX-

    if not

    no i mean just how to write if not, i saw is some script ' ~= ' is it correct?
  5. -misterX-

    if not

    in a function how do i write 'if not' cause i always used if an element is = to another then do this this and this but how do i create a condition with false
  6. hi is it possible to remoze zombies ability to swimm, i mean is it possible to make them die when touch the water??
  7. console reports: bad argument on getelementData, aclgetgroup and acldestroygroup function destroyGroup() group = getElementData(thePlayer, "group") aclDestroyGroup ( aclGetGroup(group) ) warnText("you destroyed your group", thePlayer) end addCommandHandler("destroygroup", destroyGroup)
  8. what you mean? the command create an acl group whit the name specified, then it add the account name as object
  9. yes i need it for all players and still reports the same error, cant concatenate
  10. two things, one, (line 26) the console reports warning bad argument; two (line 29) error attempt to concatenate local ourGroup a boolean value function addACLGroupObject ( thePlayer, commandName, groupName) local ourGroup = aclGetGroup ( groupName ) -- if there is no previous group with this name, we need to create one if ourGroup then warnText("this goup already exist",thePlayer) end ourGroup = aclCreateGroup ( groupName ) -- and finally let's add the object to it's group local account = getPlayerAccount(thePlayer) local accountN = getAccountName(account) aclGroupAddObject ( ourGroup, 'user.'..accountN ) setAccountData(account, "group", ourGroup) setElementData(thePlayer, "group", ourGroup) warnText( "Group created:"..ourGroup , thePlayer ) -- don't forget to save the ACL after it has been modified aclSave () end addCommandHandler ( "creategroup", addACLGroupObject )
  11. -misterX-

    warnText

    why doesnt the warntext work??? function hit ( pla, dim ) if getElementType ( pla ) == "player" then local vehicle = getPedOccupiedVehicle ( pla ) if vehicle or not vehicle then if getElementType ~= zombie then local gang = exports [ 'ROADgang' ]:getAccountGang ( getAccountName ( getPlayerAccount ( pla ) ) ) if ( gang == "ARMY" ) then warnText ( "Welcome", pla ) else setElementData ( pla, "inRestrictedArea", "true" ) triggerClientEvent ( pla, "destroyTrepassor", g_root, pla ) warnText ( "You entered a restricted area", pla ) end end end end end addEventHandler ( "onColShapeHit", g_base_col, hit )
  12. how do i make it save he position and the color of the vehicle? server carShopMarker = createMarker (2133.59,-1149.29, 23.3, "cylinder", 3, 255, 0, 0, 127) carShopMarker2 = createMarker (562, -1270, 16, "cylinder", 2, 255, 0, 0, 127) carShopMarker3 = createMarker (-1954,299,34,"cylinder",2,255,0,0,127) carShopMarker4 = createMarker (-1663,1208,6,"cylinder",2,255,0,0,127) carShopMarker5 = createMarker (1946,2068,10,"cylinder",2,255,0,0,127) createBlipAttachedTo(carShopMarker,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker2,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker3,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker4,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker5,55,2,0,255,0,0,0,200) addEvent ("viewGUI", true) function markerHit (hitPlayer, matchingDimension) if (source == carShopMarker) or (source == carShopMarker2) or (source == carShopMarker3) or (source == carShopMarker4) or (source == carShopMarker5) then triggerClientEvent ("viewGUI", hitPlayer) end end addEventHandler ("onMarkerHit", getRootElement(), markerHit) addEvent ("carShopCarBuy", true) addEventHandler ("carShopCarBuy", getRootElement(), function(id, cost, name) if (getPlayerMoney (source) >= tonumber(cost)) then outputChatBox ("Bought a " .. name, source, 255, 0, 0, false) outputChatBox ("ID: " .. id, source, 255, 0, 0, false) outputChatBox ("Cost: " .. cost, source, 255, 0, 0, false) takePlayerMoney (source, tonumber (cost)) setAccountData (getPlayerAccount (source), "funmodev2-car", tonumber(id)) setAccountData (getPlayerAccount (source), "funmodev2-paintjob", 3) setAccountData (getPlayerAccount (source), "funmodev2-carupg", 0) else outputChatBox ("You are too poor!", source, 255, 0, 0, false) end end) addEvent ("carSpawn", true) addEvent ("carDestroy", true) function carSpawn () if not (isGuestAccount (getPlayerAccount (source))) and not (isPedInVehicle(source)) then if (getElementData (source, "hisCar")) and (getElementData (source, "hisCar") ~= nil) and (getElementType(getElementData (source, "hisCar")) == "vehicle") then setElementVelocity (getElementData (source, "hisCar"), 0,0,0) local x,y,z = getElementPosition (source) setVehicleRotation (getElementData (source, "hisCar"), 0, 0, 0) setElementPosition (getElementData (source, "hisCar"), x+2,y,z +1) outputChatBox ("Car spawned.", source, 255, 0, 0) elseif not (getElementData (source, "hisCar")) then local accountData = getAccountData (getPlayerAccount (source), "funmodev2-car") if (accountData) then carID = getAccountData (getPlayerAccount (source), "funmodev2-car") x,y,z = getElementPosition (source) vehicle = createVehicle (carID, x +2, y, z +1) setElementID (vehicle, getAccountName (getPlayerAccount(source))) setElementData (source, "hisCar", vehicle) outputChatBox ("Car spawned.", source, 255, 0, 0) if (getAccountData (getPlayerAccount(source), "funmodev2-carupg")) then local upgrades = nil local upgrades = {} local upgrades = getAccountData (getPlayerAccount(source), "funmodev2-carupg") for i,v in ipairs (upgrades) do addVehicleUpgrade (vehicle, v) end end if (getAccountData (getPlayerAccount(source), "funmodev2-paintjob")) then local paintjob = getAccountData (getPlayerAccount(source), "funmodev2-paintjob") setVehiclePaintjob (vehicle, paintjob) end if (getAccountData (getPlayerAccount(source), "funmodev2-carcolor1")) and (getAccountData (getPlayerAccount(source), "funmodev2-carcolor2")) then local c1 = getAccountData (getPlayerAccount(source), "funmodev2-carcolor1") local c2 = getAccountData (getPlayerAccount(source), "funmodev2-carcolor2") setVehicleColor (vehicle, c1,c2,0,0) end else outputChatBox ("You haven't got a car.", source, 255, 0, 0) end else outputChatBox ("You're already in a car!", source, 255, 0, 0) end end end addEventHandler ("carSpawn", getRootElement(), carSpawn) function carDestroy () if not (isGuestAccount (getPlayerAccount (source))) then if (isPedInVehicle (source)) then if (getElementID(getPedOccupiedVehicle(source)) == getAccountName (getPlayerAccount(source))) then setElementHealth (getElementData (source, "hisCar"), 0) local theCar getPedOccupiedVehicle (source) local x,y,z = getElementPosition( theCar ) setElementData(source, "posX", x) setElementData(source, "posY", y) setElementData(source, "posZ", z) destroyElement (getPedOccupiedVehicle (source)) removeElementData (source, "hisCar") outputChatBox ("Car Destroyed.", source, 255, 0, 0) else outputChatBox ("This not your car!", source, 255, 0, 0) end elseif (not (isPedInVehicle (source))) and (getElementData (source, "hisCar")) and (getElementData (source, "hisCar") ~= nil) then car=getElementData(source, "hisCar") destroyElement(car) outputChatBox ("Car Destroyed.", source, 255, 0, 0) removeElementData (source, "hisCar") end end end addEventHandler ("carDestroy", getRootElement(), carDestroy) function engineSwitch () if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if (getVehicleEngineState (veh) == true) then setVehicleEngineState (veh, false) outputChatBox ("Vehicle shutted down.", source, 255, 0, 0) elseif (getVehicleEngineState (veh) == false) then setVehicleEngineState (veh, true) outputChatBox ("Vehicle started.", source, 255, 0, 0) end else outputChatBox ("You aren't in a vehicle!", source, 255, 0, 0) end end addEvent("engenieSwitch",true) addEventHandler("engenieSwitch",getRootElement(),engineSwitch) function lightsSwitch () if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if (getVehicleOverrideLights(veh) ~= 2) then setVehicleOverrideLights(veh, 2) outputChatBox ("Vehicle lights turned on.", source, 255, 0, 0) elseif (getVehicleOverrideLights(veh) ~= 1) then setVehicleOverrideLights(veh, 1) outputChatBox ("Vehicle lights turned off.", source, 255, 0, 0) end else outputChatBox ("You aren't in a vehicle!", source, 255, 0, 0) end end addEvent("lightsSwitch",true) addEventHandler("lightsSwitch",getRootElement(),lightsSwitch) function lockSwitch () if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if not (isVehicleLocked (veh)) then setVehicleLocked (veh, true) setVehicleDoorsUndamageable (veh, true) setVehicleDoorState (veh, 0, 0) setVehicleDoorState (veh, 1, 0) setVehicleDoorState (veh, 2, 0) setVehicleDoorState (veh, 3, 0) outputChatBox ("Vehicle locked.", source, 255, 0, 0) elseif (isVehicleLocked (veh)) then setVehicleLocked (veh, false) setVehicleDoorsUndamageable (veh, false) outputChatBox ("Vehicle unlocked.", source, 255, 0, 0) end else outputChatBox ("You aren't in a vehicle!", source, 255, 0, 0) end end addEvent("lockSwitch",true) addEventHandler("lockSwitch",getRootElement(),lockSwitch ) addEventHandler ("onVehicleStartEnter", getRootElement(), function(player, seat, jacked, door) if (isVehicleLocked (source) == true) then local mannetjeNaam = getAccountName (getPlayerAccount (player)) local autoNaam = getElementID (source) if (mannetjeNaam == autoNaam) then setVehicleLocked (source, false) outputChatBox ("Vehicle unlocked!", player, 255, 0, 0, false) end end end) addEventHandler ("onVehicleExplode", getRootElement(), function() local theOwner = getAccountName (getPlayerAccount(getPlayerFromName (getElementID (source)))) if (theOwner) then removeElementData (theOwner, "hisCar") end end) addEventHandler ("onPlayerQuit", getRootElement(), function(quitType, reason, responsibleElement) if (getElementData (source, "hisCar")) then blowVehicle (getElementData (source, "hisCar")) removeElementData (source, "hisCar") end end) addEventHandler( "onResourceStop", getResourceRootElement( getThisResource() ), function () for i,v in ipairs (getElementsByType ("player")) do if (getElementData (v, "hisCar")) then setElementHealth (getElementData (v, "hisCar"), 0) removeElementData (v, "hisCar") end end end ) function destroyOnExplode () setTimer (destroyElement, 2500, 1, source) end addEventHandler ("onVehicleExplode", getRootElement(), destroyOnExplode) client local screenX, screenY = guiGetScreenSize() local width, height = 200, 200 local x = (screenX/2) - (width/2) local y = (screenY/2) - (height/2) local lp = getLocalPlayer() theWindow = guiCreateWindow(x,y,width,height,"Car Features",false) guiWindowSetSizable(theWindow,false) guiSetVisible (theWindow, false) spawnBut = guiCreateButton(0.0604,0.120,0.4,0.2,"Spawn",true,theWindow) engenieBut = guiCreateButton(0.0604,0.420,0.4,0.2,"Engenie",true,theWindow) lockBut = guiCreateButton(0.490,0.420,0.4,0.2,"Lock",true,theWindow) lightsBut = guiCreateButton(0.0604,0.720,0.4,0.2,"Lights",true,theWindow) destroyBut = guiCreateButton(0.490,0.120,0.4,0.2,"Destroy",true,theWindow) function resourceStart () bindKey ("F5", "down", menuShow) end addEventHandler ("onClientResourceStart", getResourceRootElement ( getThisResource () ), resourceStart) function menuShow () visableornot = guiGetVisible (theWindow) if (visableornot == true) then guiSetVisible (theWindow, false) showCursor (false) end if (visableornot == false) then guiSetVisible (theWindow, true) showCursor (true) end end addEvent ("carSpawn", true) addEvent ("carDestroy", true) function guiClick (button, state, absoluteX, absoluteY) if (source == spawnBut) then triggerServerEvent ("carSpawn", lp) elseif (source == destroyBut) then triggerServerEvent ("carDestroy", lp) elseif (source == engenieBut) then triggerServerEvent ("engenieSwitch", lp) elseif (source == lockBut) then triggerServerEvent ("lockSwitch", lp) elseif (source == lightsBut) then triggerServerEvent ("lightsSwitch", lp) end end addEventHandler ("onClientGUIClick", getRootElement(), guiClick) carshopWindow = guiCreateWindow(500,200,290,440,"Car Shop",false) guiSetVisible (carshopWindow, false) guiSetAlpha(carshopWindow,1) guiWindowSetSizable(carshopWindow,false) selectLabel = guiCreateLabel(0.0423,0.1009,0.8889,0.078,"Select your car",true,carshopWindow) guiSetAlpha(selectLabel,1) guiLabelSetColor(selectLabel,255,255,255) guiLabelSetVerticalAlign(selectLabel,"top") guiLabelSetHorizontalAlign(selectLabel,"left",false) guiSetFont(selectLabel,"default-bold-small") carGridList = guiCreateGridList(0.0476,0.1789,0.9048,0.6789,true,carshopWindow) guiGridListSetSelectionMode(carGridList,0) carColumn = guiGridListAddColumn(carGridList,"Car",0.5) costColumn = guiGridListAddColumn(carGridList,"$",0.3) local cars = {{579,60000},{400,60000},{404,28000},{489,65000},{505,65000},{479,45000},{442,45000},{458,45000},{602,50000},{496,42500},{401,41000},{518,60000},{527,75000},{589,75000},{419,45000},{533,75000},{526,50000},{474,55000},{545,50000},{517,45000},{410,41000},{600,50000},{436,41000},{580,50000},{439,75000},{549,75000},{491,45000},{445,45000},{507,45000},{585,45000},{587,75000},{466,55000},{492,50000},{546,45000},{551,45000},{516,45000},{467,45000},{426,47500},{547,45000},{405,55000},{409,75000},{550,45000},{566,45000},{540,45000},{421,50000},{529,45000},{402,120000},{542,65000},{603,120000},{475,75000},{562,120000},{565,95000},{559,120000},{561,50000},{560,120000},{558,100000},{429,120000},{541,120000},{415,120000},{480,95000},{434,100000},{494,120000},{502,120000},{503,120000},{411,120000},{506,120000},{451,120000},{555,95000},{477,95000},{499,25000},{498,25000},{578,50000},{486,70000},{455,75000},{588,50000},{403,75000},{414,50000},{443,75000},{515,75000},{514,75000},{531,12000},{456,45000},{422,45000},{482,95000},{530,12000},{418,45000},{572,12000},{582,50000},{413,50000},{440,50000},{543,65000},{583,12000},{478,35000},{554,50000},{536,75000},{575,75000},{534,75000},{567,75000},{535,75000},{576,75000},{412,75000},{568,75000},{457,12000},{483,45000},{508,40000},{571,10000},{500,55000},{444,120000},{556,120000},{557,120000},{471,20000},{495,100000},{539,75000},{481,2500},{509,2500},{581,45000},{462,12000},{521,60000},{463,50000},{522,75000},{448,12000},{468,45000},{586,45000},{485,12000},{431,60000},{438,45000},{437,60000},{574,12000},{420,45000},{525,75000},{408,50000},{428,65000}} for i,v in ipairs (cars) do local carName = getVehicleNameFromModel (v[1]) local row = guiGridListAddRow (carGridList) guiGridListSetItemText (carGridList, row, 1, carName, false, true) guiGridListSetItemText (carGridList, row, 2, tostring(v[2]), false, true) end guiSetAlpha(carGridList,1) buyButton = guiCreateButton(0.0476,0.8624,0.7778,0.0963,"Buy it!",true,carshopWindow) guiSetAlpha(buyButton,1) closeButton = guiCreateButton(0.8571,0.8624,0.0899,0.1009,"x",true,carshopWindow) addEvent ("viewGUI", true) function viewGUI () if (getLocalPlayer() == source) then guiSetVisible (carshopWindow, true) showCursor (true) end end addEventHandler ("viewGUI", getRootElement(), viewGUI) function onClientGUIClick (button, state, absoluteX, absoluteYe) if (source == buyButton) then guiSetVisible (carshopWindow, false) showCursor (false) if (guiGridListGetSelectedItem (carGridList)) then local carName = guiGridListGetItemText (carGridList, guiGridListGetSelectedItem (carGridList), 1) local carID = getVehicleModelFromName (carName) local carCost = guiGridListGetItemText (carGridList, guiGridListGetSelectedItem (carGridList), 2) triggerServerEvent ("carShopCarBuy", getLocalPlayer(), carID, carCost, carName) end elseif (source == closeButton) then guiSetVisible (carshopWindow, false) showCursor (false) end end addEventHandler ("onClientGUIClick", getRootElement(), onClientGUIClick)
  13. how do i convert this from double click to on button click? i have already created the button "accept" client Wnd = guiCreateWindow ( 0.2, 0.2, 0.25, 0.5, "Free Vehicles", true ) guiSetAlpha( Wnd, 1 ) button = guiCreateButton ( 0.5, 0.8, 0.45, 0.15, "Close", true, Wnd ) button1 = guiCreateButton ( 0.01, 0.8, 0.45, 0.15, "Accept", true, Wnd ) label = guiCreateLabel ( 0.1, 0.1, 0.9, 0.1, "Double Click Vehicle to take it.", true, Wnd ) showCursor(false) guiSetVisible( Wnd, false ) guiWindowSetSizable( Wnd, false ) guiWindowSetMovable( Wnd, false ) vehicles = { {"BMX", 481}, {"Bike", 509}, {"Mountain Bike", 510}, {"Faggio", 462}, } grid = guiCreateGridList(0.01, 0.2, 0.99, 0.5, true, Wnd) guiGridListAddColumn(grid, "Vehicles", 0.85) for i,veh in ipairs(vehicles) do row = guiGridListAddRow(grid) -- guiGridListSetItemText(grid, row, 1, tostring(veh[1]), false, false) guiGridListSetItemData(grid, row, 1, tostring(veh[2])) end function use() local row, col = guiGridListGetSelectedItem(grid) if (row and col and row ~= -1 and col ~= -1) then local model = tonumber(guiGridListGetItemData(grid, row, 1)) if model ~= "" then triggerServerEvent("CreVehice", localPlayer, model) end end end addEventHandler("onClientDoubleClick", root, use, false) function close() if (source == button) then guiSetVisible(Wnd,false) showCursor(false) end end addEventHandler("onClientGUIClick", button, close) function showGUI2() guiSetVisible(Wnd,true) showCursor(true) end addEvent("showGUI2",true) addEventHandler("showGUI2", getRootElement(), showGUI2) server marker = createMarker( -2639.0168457031, 635.59753417969, 13, "cylinder", 2, 255, 255, 255, 255 ) marker2 = createMarker( -1636.9022216797, 672.30364990234, 6, "cylinder", 2, 255, 255, 255, 255 ) marker3 = createMarker( 1187.6276855469, -1308.4471435547, 12, "cylinder", 2, 255, 255, 255, 255 ) marker4 = createMarker( 1537.5406494141, -1684.6533203125, 12, "cylinder", 2, 255, 255, 255, 255 ) marker5 = createMarker( 2014.55078125, -1431.0400390625, 12, "cylinder", 2, 255, 255, 255, 255 ) marker6 = createMarker( 1592.2445068359, 1820.3737792969, 9, "cylinder", 2, 255, 255, 255, 255 ) local vehicles = {} function spawnVeh(id) local x, y, z = getElementPosition(source) if isElement(vehicles[source]) then destroyElement(vehicles[source]) end vehicles[source] = createVehicle(id, x + 1, y, z) warpPedIntoVehicle(source, vehicles[source]) end addEvent("CreVehice",true) addEventHandler("CreVehice", root, spawnVeh) addEventHandler("onPlayerQuit", root, function() if isElement(vehicles[source]) then destroyElement(vehicles[source]) vehicles[source] = nil end end) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",marker,showGUI) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",marker2,showGUI) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",marker3,showGUI) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",marker4,showGUI) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",marker5,showGUI) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",marker6,showGUI)
  14. it still give badargument
  15. -misterX-

    scoreboard

    what's wrong? the console says bad agrument on getplayeraccount and getaccount data exports [ "scoreboard" ]:addScoreboardColumn ( "group", 3 ) function updatePlayersMoney ( ) local account = getPlayerAccount(player) for index, player in ipairs ( getElementsByType "player" ) do local group = getAccountData(account, "group") end end setTimer ( updatePlayersMoney, 2500, 0 )
  16. it works but it doesn't add the object any help??
  17. i got this code it should create an acl group but it doesn't, i gave it the admin rights but when i try to use the function it remove itslef from the acl.. function addACLGroupObject ( thePlayer, commandName, groupName) local ourGroup = aclGetGroup ( groupName ) -- if there is no previous group with this name, we need to create one if not ourGroup then ourGroup = aclCreateGroup ( groupName ) end -- and finally let's add the object to it's group account = getPlayerAccount(source) accountN = getAccountName(account) aclGroupAddObject ( ourGroup, accountN ) -- don't forget to save the ACL after it has been modified aclSave () end addCommandHandler ( "creategang", addACLGroupObject )
  18. how do i create a team by using a command i mean something /createteam teamname on the wiki i didn't see how to add information on addCommandHandler just how link it to a function
  19. if i put this in a resource do i have to give it the admin rights?
  20. is there any fuction witch i can use to create an acl group?
  21. the console doesn't report any error... but this functio wich save thosa data report "bad argument" on all set account data of the weapons! function save() local team = getPlayerTeam(source) -- Gets the players team local playeraccount = getPlayerAccount(source) -- Checks to see if the player is a guest or not setAccountData(playeraccount, "team", getTeamName(team)) --saves team setAccountData (account, "funmodev2-weaponID0", getPedWeapon (source, 0)) setAccountData (account, "funmodev2-weaponID1", getPedWeapon (source, 1)) setAccountData (account, "funmodev2-weaponID2", getPedWeapon (source, 2)) setAccountData (account, "funmodev2-weaponID3", getPedWeapon (source, 3)) setAccountData (account, "funmodev2-weaponID4", getPedWeapon (source, 4)) setAccountData (account, "funmodev2-weaponID5", getPedWeapon (source, 5)) setAccountData (account, "funmodev2-weaponID6", getPedWeapon (source, 6)) setAccountData (account, "funmodev2-weaponID7", getPedWeapon (source, 7)) setAccountData (account, "funmodev2-weaponID8", getPedWeapon (source, -- s8) -->) setAccountData (account, "funmodev2-weaponID9", getPedWeapon (source, 9)) setAccountData (account, "funmodev2-weaponID10", getPedWeapon (source, 10)) setAccountData (account, "funmodev2-weaponID11", getPedWeapon (source, 11)) setAccountData (account, "funmodev2-weaponID12", getPedWeapon (source, 12)) setAccountData (account, "funmodev2-weaponAmmo0", getPedTotalAmmo (source, 0)) setAccountData (account, "funmodev2-weaponAmmo1", getPedTotalAmmo (source, 1)) setAccountData (account, "funmodev2-weaponAmmo2", getPedTotalAmmo (source, 2)) setAccountData (account, "funmodev2-weaponAmmo3", getPedTotalAmmo (source, 3)) setAccountData (account, "funmodev2-weaponAmmo4", getPedTotalAmmo (source, 4)) setAccountData (account, "funmodev2-weaponAmmo5", getPedTotalAmmo (source, 5)) setAccountData (account, "funmodev2-weaponAmmo6", getPedTotalAmmo (source, 6)) setAccountData (account, "funmodev2-weaponAmmo7", getPedTotalAmmo (source, 7)) setAccountData (account, "funmodev2-weaponAmmo8", getPedTotalAmmo (source, -- s8) -->) setAccountData (account, "funmodev2-weaponAmmo9", getPedTotalAmmo (source, 9)) setAccountData (account, "funmodev2-weaponAmmo10", getPedTotalAmmo (source, 10)) setAccountData (account, "funmodev2-weaponAmmo11", getPedTotalAmmo (source, 11)) setAccountData (account, "funmodev2-weaponAmmo12", getPedTotalAmmo (source, 12)) end addEventHandler("onPlayerWasted", getRootElement(), save)
  22. what do you mean returning false?
×
×
  • Create New...