Jump to content

Arnold-1

Members
  • Posts

    249
  • Joined

  • Last visited

Everything posted by Arnold-1

  1. Arnold-1

    Help derby

    People doesn't download serverside, so it isn't yours, and IF you were saying the truth, so it's your responsibility to protect your scripts(i know it's not yours)
  2. or just use this: setElementData(thePlayer,"VEHICLE",createVehicle(...)) destroyElement(getElementData(thePlayer,"VEHICLE")
  3. Arnold-1

    Help derby

    ........................................ what he have posted is a server side. and yes use lua tags.
  4. ah, i didn't know you that you're trying to edit the speed.
  5. Ehhhm. this will delete the files on resource start, how can he use them then?
  6. https://wiki.multitheftauto.com/wiki/GetElementVelocity see the example.
  7. you are clearly using the mph not the kph
  8. Arnold-1

    headlight

    (facepalm) guys please don't help him if you don't know. addEventHandler( "onClientGUIClick", root, function () if ( source == button5 ) then triggerServerEvent("PO", localPlayer) end end ) function Buy() local veh = getPedOccupiedVehicle(localPlayer) local id = getElementModel(veh) setVehicleOverrideLights ( veh, 2 ) timer = setTimer( function() setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 0, 0, 255) else setVehicleLightState ( veh, 3, 0) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 0, 0) end, 500, 0) else killTimer(timer) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 3, 0) setVehicleHeadLightColor(veh, 255, 255, 255) setVehicleOverrideLights ( veh, 1 ) end end end end end addEvent("P",true) addEventHandler("P", root, Buy) function Buyy() if (getPlayerMoney(source) >= 100) then takePlayerMoney(source, 100) triggerClientEvent(source,"P") end end addEvent("PO",true) addEventHandler("PO", root, Buyy)
  9. oh, yeah, he must execute the function "onClientResourceStart"
  10. LOL btw upload it to imgur.com then use the link.
  11. weird, make sure of your meta.
  12. record every kill or death, you can't get them while you didn't record them already.
  13. No, You can't Bind the key serverside, and trigger it to client. server: function bound (theplayer) account=getPlayerAccount(theplayer) if isObjectInACLGroup("user."..account,"Admin") then triggerClientEvent("onMapAllowed",theplayer) else triggerClientEvent("onMapUnallowed",theplayer) end end addEventHandler("onPlayerJoin",root,function () for i,v in ipairs(getElementsByType("player")) do bindKey(v,"F1","down",bound) end end ) client: addEvent("onMapAllowed",true) addEvent("onMapUnallowed",true) function allowed () guiSetEnabled(button,true) end function unallowed () guiSetEnabled(button,false) end addEventHandler("onMapAllowed",root,allowed) addEventHandler("onMapUnallowed",root,unallowed)
  14. You have to make it for the player who attacked, not the player who was killed: server: local weaponA = { [22] = 17, -- Pistol [23] = 17, -- Silinced Pistol [24] = 7, -- Desert Eagle [25] = 10, -- Shotgun [27] = 7, -- SPAZ-12 Combat Shotgun [29] = 30,-- MP5 [30] = 50, -- AK-47 [31] = 50, -- M4 [33] = 10, -- Country Rifle [34] = 7 -- Sniper Rifle } function playerWasted(_, attacker, weapon) if attacker and attacker ~= source and getElementType(attacker) == "player" then if weaponA[weapon] then triggerClientEvent("onAmmoTake",attacker) giveWeapon(attacker, weapon, weaponA[weapon]) end end end addEventHandler("onPlayerWasted", root, playerWasted) client: function weaponA( ) dxDrawText("+Ammo", 823, 198, 1015, 242, tocolor(0, 0, 0, 255), 0.80, "bankgothic", "left", "top", false, false, true, false, false) end addEvent("onAmmoTake",true) addEventHandler("onAmmoTake",root,weaponA)
  15. Arnold-1

    Bugs

    name the getAccount table, like accounts = getAccounts then use accounts.
  16. 1- No you're not supposed to put both server and client, except if it's needed. 2-You can't call functions from server to client or from client to server, that's impossible, but you can call from client to client or from server to server 3-Okey, well you can't call a function without it being loaded, so if you want it on start you must keep the addEventHandler after the function, that's it 4-Yes, every one will do it's job. 5-functions arguments doesn't matter, like if i tell you goeat(cheese,milk) those are the arguments of go eat, so in the call back function you can name them as you want, like: function goeat(blabla1,blabla2) eat(blabla1) drink(blabla2) end and For addEventHandler, you showed a server side example, when using it server side it gives the first two arguments as 1.the player who executed the command 2.what command this is. 3...4...5...6..7...8... are the words the guy wrote after the command like /goeat cheese milk it will be the arguments and for client it only gives command name hope this was helpful
  17. No event? btw make it tonumber instead of tostring
  18. remove player at line 1, and replace player inside the function with source. and put the timer inside the function and make another function inside it with textDestroyDisplay and textDestroyItem. so it will be like: function text () local test = math.random(100, 200) local serverDisplay = textCreateDisplay() textDisplayAddObserver ( serverDisplay, source) local serverText = textCreateTextItem ( tonumber(test), 0.5, 0.5 ) textDisplayAddText ( serverDisplay, serverText ) setTimer(function () textDestroyDisplay ( serverDisplay ) textDestroyTextItem( serverText ) end,6000,1) end addEventHandler("onPlayerWasted",root,text)
  19. You could post this in open source contributors section
  20. are you suggesting for people to steal SAUR's client files? oh, sorry about that, i thought you downloaded it from somewhere.
×
×
  • Create New...