-
Posts
768 -
Joined
-
Last visited
Everything posted by Drakath
-
onClientElementDataChange is an event. Check bindKey syntax. String key must be "h" not horn.
-
Identify Mortal Strike with knife in "KILL_Knife_Player"
Drakath replied to ronaldoguedess's topic in Scripting
targetPlayer is the victim. Source is the killer. -
Firstly shutdown the Server. After it is shut down,add this: <object name="user.DGJordy"></object> to Admin group located in acl.xml. And finally start the server and log in with your account.
-
Well, it is not necessary because you can accomplish that by scripting with existing functions.
-
It is possible if you set a blip visible distance. But you didn't do that.
-
This gangs system has exported function 'getPlayerGang'. You could use it to what you desire.
-
Are you sure it doesn't appear? The code looks fine.
-
Use cancelEvent when someone starts the animation you want to block.
-
This should do the trick, though I'm not sure why you attached the object so I removed that line. on = 0 function checkModel( theVehicle ) Car = getElementModel ( theVehicle ) end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), checkModel ) function onEnterVehicle ( theVehicle, seat, jacked ) if ( getElementModel ( theVehicle ) == 598 ) then bindKey ( source, "F10", "down", createObj ) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), onEnterVehicle ) function createObj ( player ) if Car == 598 then if on == 0 then on = 1 veh = getPedOccupiedVehicle (player) x, y, z = getElementPosition (veh) object1 = createObject ( 1983, x, y, z ) else on=0 destroyElement(object1) end end end left1 = function (player) veh = getPedOccupiedVehicle (player) x, y, z = getElementPosition (veh) moveObject (object1, 1000, x, y, z) end function onBind () bindKey ( source, "a", "down", left1 ) end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), onBind ) function offBind () unbindKey ( source, "a", "down", left1 ) end addEventHandler ( "onPlayerVehicleExit", getRootElement(), offBind )
-
setElementPosition giveWeapon addCommandHandler setPlayerTeam setElementModel
-
Thanks for trying to help, but I already fixed it.
-
You have to write it together.
-
local r , g , b = getTeamColor(spawnTeam) theBlip = createBlipAttachedTo(player, 0, 2, r, g, b) setBlipVisibleDistance ( theBlip, 200 )
-
Client: function behehehe() player = localPlayer local kills = tonumber(getElementData(player,"Zombie kills")) if kills > 12 then outputChatBox("ok", 0,255,0) elseif not kills > 12 then outputChatBox("lol" ,255,0,0) setElementFrozen ( player, true ) else outputChatBox("wtf", 255,0,0) end end addCommandHandler("omg", behehehe) So if a player has more than 12 kills it outputs "ok". But if he doesn't, nothing happens. Why?
-
Is your friend holding this Server on his Computer? If yes then he can connect even if others can't because he is the local player.
-
addCommandHandler("create", function (player) local xx,yy,zz = getElementPosition(player) object = createObject(3095, xx,yy,zz - 1) setElementData(player, "crea", object) end ) function lol (player) local x, y, z = getElementPosition ( getElementData(player, "crea", object) ) setElementPosition ( getElementData(player, "crea", object), x, y, z + 1 ) end function lol2 (player) local x, y, z = getElementPosition ( getElementData(player, "crea", object) ) setElementPosition ( getElementData(player, "crea", object), x, y, z - 1 ) end function lol3 (player) local x, y, z = getElementPosition ( getElementData(player, "crea", object) ) setElementPosition ( getElementData(player, "crea", object), x + 1, y, z ) end function lol4 (player) local x, y, z = getElementPosition ( getElementData(player, "crea", object) ) setElementPosition ( getElementData(player, "crea", object), x - 1, y, z ) end function lol5 (player) local x, y, z = getElementPosition ( getElementData(player, "crea", object) ) setElementPosition ( getElementData(player, "crea", object), x, y - 1, z ) end function lol6(player) local x, y, z = getElementPosition ( getElementData(player, "crea", object) ) setElementPosition ( getElementData(player, "crea", object), x, y + 1, z ) end function binds() bindKey( "pgup", "down", lol ) bindKey( "pgdn", "down", lol2 ) bindKey( "arrow_r", "down", lol3 ) bindKey( "arrow_l", "down", lol4 ) bindKey( "arrow_d", "down", lol5 ) bindKey( "arrow_u", "down", lol6 ) end addEventHandler ( "onResourceStart", getRootElement(), binds )
-
local vehicle = createVehicle(506, 2100.2697, 1397.4947, 10.3, 0, 0, 0) setElementData(vehicle, "HLS", "groupname") setElementData(vehicle, "HLS2", "groupname") addEventHandler("onVehicleStartEnter", root, function(thePlayer, seat, jacked, door) local vehicleOwner = getElementData(source, "HLS") or getElementData(source, "HLS2") local gangGroup = getElementData(thePlayer, "HLS") or getElementData(thePlayer, "HLS2") if (not vehicleOwner) then return end if (gangGroup ~= vehicleOwner) then outputChatBox("This car is locked and belongs to the following class: Admins", thePlayer, 245, 20, 20, false) cancelEvent() end end )
-
Try this. Serverside: addCommandHandler("create", function (player) local xx,yy,zz = getElementPosition(player) object = createObject(3095, xx,yy,zz - 1) setElementData(player, "crea", object) end ) function lol (player) local x, y, z = getElementPosition ( getElementData(player, "crea", object) ) setElementPosition ( getElementData(player, "crea", object), x, y, z + 1 ) end bindKey( "pgup", "down", lol ) function lol2 (player) local x, y, z = getElementPosition ( getElementData(player, "crea", object) ) setElementPosition ( getElementData(player, "crea", object), x, y, z - 1 ) end bindKey( "pgdn", "down", lol2 ) function lol3 (player) local x, y, z = getElementPosition ( getElementData(player, "crea", object) ) setElementPosition ( getElementData(player, "crea", object), x + 1, y, z ) end bindKey( "arrow_r", "down", lol3 ) function lol4 (player) local x, y, z = getElementPosition ( getElementData(player, "crea", object) ) setElementPosition ( getElementData(player, "crea", object), x - 1, y, z ) end bindKey( "arrow_l", "down", lol4 ) function lol5 (player) local x, y, z = getElementPosition ( getElementData(player, "crea", object) ) setElementPosition ( getElementData(player, "crea", object), x, y - 1, z ) end bindKey( "arrow_d", "down", lol5 ) function lol6(player) local x, y, z = getElementPosition ( getElementData(player, "crea", object) ) setElementPosition ( getElementData(player, "crea", object), x, y + 1, z ) end bindKey( "arrow_u", "down", lol6 )
-
I think the one data will replace another. Try changing HLS to HLS2 like this: setElementData(vehicle, "HLS2", "SWAT Member")
-
You could use event handler: 'onPedWasted' to count how many zombies are dead. After 30 are dead use: createPed to spawn them back.
-
radararea2 = createRadarArea( 110.91990, 1800.89435, 200, 145, 255, 255, 255, 225 ) createBlip(279.40317, 1831.25439, 7.72656,61) marker2 = createMarker(298.98865, 1815.90613, 3.71094,"cylinder",2,0,0,255,255) addCommandHandler("buyarea51", function(player) local gangName = exports.gang_system:getPlayerGang(player) if gangName then local money = getPlayerMoney(player) if (money >= 1000000) then takePlayerMoney(player, 1000000) local color = exports.gang_system:getGangColor(gangName) setRadarAreaColor(radararea2, color[1], color[2], color[2], 255) outputChatBox("#FFF000[bASE] #00FFFFYour gang buyed a base #00FF00 Area #FFF000 51", player, 0, 0, 0, true) end end end)
-
This line doesn't do anything: addEventHandler ( 'onPlayerLogin', true) And we can't help you if you only show us the event handlers. We need to see the functions. Also onPlayerLogin is server-side event.