Jump to content

CobbTheWarriorsRPG

Members
  • Posts

    111
  • Joined

  • Last visited

Everything posted by CobbTheWarriorsRPG

  1. Hello, I made a panel, but when i hit it, The guy show to the others players function showGuiAuto ( ) guiSetVisible ( autoventana, true) showCursor ( true ) end addEventHandler ( "onClientMarkerHit", auto, showGuiAuto ) help please, Thanks
  2. Because, I dont get the money when i kill a "Zombie" ped, The zombies are from dayz, No from the slothman resource :c
  3. Or if i made it clientside like: client: addEventHandler ( "onPedWasted", root, function ( _, killer ) if ( getElementType ( killer ) == "player" ) then triggerServerEvent ( "onPedReward", getLocalPlayer() ) end end ) server: function reward( ) givePlayerMoney ( localPlayer, 2000 ) end addEvent( "onPedReward", true ) addEventHandler("onPedReward", root , reward)
  4. Thanks Tete, but they doesnt give the money , How its posible?
  5. WARNING:rewardonkill\server.lua:3:Bad Argument @ 'getElemenType' [Expected element at argument 1, got boolean]
  6. Solid bro, Thats the code did you send me on skype But there is the error on debugscript, In a simple view i dont saw errors :c, help? thanks all EDIT: if i change givePlayerMoney For outputChatBox("lol") if you kill a ped the lol appear,Thats is strange
  7. The event is for a Player, I try it and doesnt work, I change the event for onPedWasted But Nothing happened.
  8. Hello, Im trying to make if you kill a ped they give to you some money, But... Server: addEventHandler ( "onPedWasted", root, function ( _, killer ) givePlayerMoney ( killer, 2000 ) end ) WARNING:rewardonkill\server.lua:1:Bad Argument @ 'givePlayerMoney' And No money For me... Some help please? thanks !
  9. Hello im trying to made a base system, If you are in the specified gang you will be able to enter in the base, else if you don are in the gang you will be kicked to a position, ok Here is the problem If the guy enter and the guy are in the specified gang but are in a vehicle, the guy will be kicked (teleported) So i need help Please... The code client.lua secu = createColCuboid(1292.1208496094, 2072.3420410156, 10.217512130737, 198.5, 165, 25) function security () if not ( getElementData ( localPlayer, "gang" ) == "Testers") and isElementWithinColShape ( localPlayer, secu )then triggerServerEvent ( "onViolate", localPlayer ) end end addEventHandler ( "onColShapeHit", secu, security ) server.lua objeto = createObject ( 987, 1301.5999755859, 2099.1000976563, 10, 0, 0, 0 ) x,y,z = getElementPosition (objeto) col = createColCuboid(1302.3861083984, 2088.3466796875, 10.812677383423, 11.25, 11.25, 2) secu = createColCuboid(1292.1208496094, 2072.3420410156, 10.217512130737, 198.5, 165, 25) function Funcion ( player ) if ( getElementData ( player, "gang" ) == "Testers") then moveObject ( objeto, 10000, 1301.5, 2097.3994140625, 9.3000001907349-10 ) else outputChatBox("No perteneces a esta Gang") end end addEventHandler ( "onColShapeHit", col, Funcion ) function Funcion2 () moveObject ( objeto, 3000, 1301.5, 2097.3994140625, 9.3000001907349 ) end addEventHandler ( "onColShapeLeave", col, Funcion2 ) function secuServer ( ) setElementPosition ( source, 1270.8793945313, 2022.7806396484, 10.8203125 ) outputChatBox ( "No Perteneces a Este Clan", player, 255, 0, 0, true ) end addEventHandler ( "onViolate", secu, secuServer ) addEvent("onViolate", true ) Thanks.
  10. The same errors bro :c Thanks,Somo help please?
  11. So..? what i need to complete? i read this https://wiki.multitheftauto.com/wiki/Xm ... tAttribute for do that Bro
  12. Hello im just testing how works the xml and i made this settings.xml <settings timer="300" /> client.lua local xml = getResourceConfig("settings.xml") local timerset = xmlNodeGetAttribute(xml, "timer") function JustATest() outputChatBox("testing this") end setTimer ( JustATest, tonumber(timerset), 0) but it gives to me 2 errors,and doesnt work WARNING:test/client.lua:2: Bad Argument @'xmlNodeGetAttribute' WARNING:test/client.lua:6: Bad Argument @'setTimer' [Expected number at Argument 2, got nil] Some help Please?
  13. Solved,By The PRO Of castillo Really Thanks.
  14. Yeah But the script only gives 1 thing to the player who hit the marker ,i want to give the items ( set element data) to all the players who are in the gang of the player who hits the marker I made This code but it doesnt work local marker1 = createMarker( 1961.9000244141, -2214.6000976563, 16.10000038147, 'cylinder', 2.0, 255, 0, 0, 150) local marker2 = createMarker( -783, -2016.8000488281, 8.1000003814697, 'cylinder', 2.0, 255, 0, 0, 150) local marker3 = createMarker( -1135.0999755859, -991.90002441406, 130.5, 'cylinder', 2.0, 255, 0, 0, 150) local marker4 = createMarker( -1356.5999755859, 509.70001220703, 11.199999809265, 'cylinder', 2.0, 255, 0, 0, 150) local marker5 = createMarker( 247.89999389648, 1859.3000488281, 13.10000038147, 'cylinder', 2.0, 255, 0, 0, 150) local ItemAzar = { "Pasta Can", "Beans Can", "Burger", "Pizza", "Soda Bottle", "Empty Soda Cans", "Scruffy Burgers", "Milk", "Raw Meat", "Cooked Meat" , "Wood Pile", "Empty Gas Canister", "Full Gas Canister", "Roadflare", "Wire Fence", "Tent", "Tire", "Engine", "Tank Parts", "Camouflage Clothing", "Ghillie Suit", "Civilian Clothing", "Survivor Clothing", "Box of Matches", "Infrared Goggles", "Night Vision Goggles", "GPS", "Map", "Toolbox", "Watch", "Radio Device", } function MarkerHit1 ( player ) local playerGang = getElementData ( player, "gang" ) local turfGang = getElementData ( marker1, "getTurfGang", true ) if (turfGang == playerGang) then outputChatBox("Esta base ya pertence a "..turfGang, player, 0, 255, 0, false) else if not getPlayerTeam(player) then return end local team = getPlayerTeam ( player ) if (getTeamName( team ) == "geral") then local playerGang = getElementData ( player, "gang" ) if ( playerGang ) then if ( isTimer ( beachturfTimer ) ) then return end if not (turfGang == playerGang) then if isTimer(floodTimer) then return else outputChatBox("[ALERTA]Estan tomando la base en "..getElementZoneName(marker1)..","..getElementZoneName(marker1,true)) floodTimer = setTimer(function() end, 5000, 1) end end local r, g, b = unpack ( exports [ "gang_system" ]:getGangColor ( playerGang ) ) local turfGang = getElementData ( marker1, "getTurfGang", true ) if turfGang then outputChatBox("Entraste En La Base de "..turfGang..". Espera 2 Minutos Para Poder Conquistar la base Y Ganar la base", player, 0, 255, 0, false) else outputChatBox("Esta base Aun No Pertenese A Nadie. Espera 2 Minutos Para Poder Conquistarla", player, 0, 255, 0, false) end beachturfTimer1 = setTimer ( function ( ) if isElementWithinMarker ( player, marker1 ) then setMarkerColor ( marker1, tonumber(r), tonumber(g), tonumber(b), 100 ) outputChatBox("Felicidades Conquistaste la base!", player, 0, 255, 0, false) triggerClientEvent("onTakeTurf", player) givePlayerMoney ( player, 4000 ) setElementData ( marker1, "getTurfGang", playerGang ) setCameraMatrix(player, 1939.5476074219, -2162.421875, 39.010345458984, 1961.9000244141, -2214.6000976563, 16.10000038147, 0, 70) setTimer(function(player) if isElement(player) then setCameraTarget(player) end end,5000,1,player) --here setTimer ( function() if exports [ "gang_system" ]:getGangMembers ( playerGang ) then setElementData( playerGang,ItemAzar[ math.random(1, #ItemAzar)], 1) end end, 5000, 1 ) end end ,3000, 1 ) end end end end addEventHandler( "onMarkerHit", marker1, MarkerHit1 ) function StopTurf ( player ) if ( isTimer ( beachturfTimer1 ) ) then killTimer ( beachturfTimer1 ); end outputChatBox("Has abandonado la base", source) end addEventHandler ( "onMarkerLeave", marker1, StopTurf ) basicly my idea is if you have a "base" you clan or gang get random items in x time @Solidsnake14 can you help me please?
  15. Dunno bro i make this function MarkerHit1 ( player ) local playerGang = getElementData ( player, "gang" ) local turfGang = getElementData ( marker1, "getTurfGang", true ) if (turfGang == playerGang) then outputChatBox("Esta base ya pertence a "..turfGang, player, 0, 255, 0, false) else if not getPlayerTeam(player) then return end local team = getPlayerTeam ( player ) if (getTeamName( team ) == "geral") then local playerGang = getElementData ( player, "gang" ) if ( playerGang ) then if ( isTimer ( beachturfTimer ) ) then return end if not (turfGang == playerGang) then if isTimer(floodTimer) then return else outputChatBox("[ALERTA]Estan tomando la base en "..getElementZoneName(marker1)..","..getElementZoneName(marker1,true)) floodTimer = setTimer(function() end, 5000, 1) end end local r, g, b = unpack ( exports [ "gang_system" ]:getGangColor ( playerGang ) ) local turfGang = getElementData ( marker1, "getTurfGang", true ) if turfGang then outputChatBox("Entraste En La Base de "..turfGang..". Espera 2 Minutos Para Poder Conquistar la base Y Ganar la base", player, 0, 255, 0, false) else outputChatBox("Esta base Aun No Pertenese A Nadie. Espera 2 Minutos Para Poder Conquistarla", player, 0, 255, 0, false) end beachturfTimer1 = setTimer ( function ( ) if isElementWithinMarker ( player, marker1 ) then setMarkerColor ( marker1, tonumber(r), tonumber(g), tonumber(b), 100 ) outputChatBox("Felicidades Conquistaste la base!", player, 0, 255, 0, false) triggerClientEvent("onTakeTurf", player) givePlayerMoney ( player, 4000 ) setElementData ( marker1, "getTurfGang", playerGang ) setCameraMatrix(player, 1939.5476074219, -2162.421875, 39.010345458984, 1961.9000244141, -2214.6000976563, 16.10000038147, 0, 70) setTimer(function(player) if isElement(player) then setCameraTarget(player) end end,5000,1,player) -- here behind setTimer ( function() if exports [ "gang_system" ]:getGangMembers ( playerGang ) then setElementData( player,ItemAzar[ math.random(1, #ItemAzar)], 1) end end, 5000, 0 ) end end ,3000, 1 ) end end end end addEventHandler( "onMarkerHit", marker1, MarkerHit1 ) its a export i dont know its good
  16. A base system if you capture the marker all the clan members got the items
  17. @Solidsnake14 and how can i define it?
  18. Hello i am making a base system based on turfsystem by Sasuke* i want when you capture a thing your "clan" or "gang" get some things.... there its my script local marker1 = createMarker( 1961.9000244141, -2214.6000976563, 16.10000038147, 'cylinder', 2.0, 255, 0, 0, 150) local ItemAzar = { "Pasta Can", "Beans Can", "Burger", "Pizza", "Soda Bottle", "Empty Soda Cans", "Scruffy Burgers", "Milk", "Raw Meat", "Cooked Meat" , "Wood Pile", "Empty Gas Canister", "Full Gas Canister", "Roadflare", "Wire Fence", "Tent", "Tire", "Engine", "Tank Parts", "Camouflage Clothing", "Ghillie Suit", "Civilian Clothing", "Survivor Clothing", "Box of Matches", "Infrared Goggles", "Night Vision Goggles", "GPS", "Map", "Toolbox", "Watch", "Radio Device", } function MarkerHit1 ( player ) local playerGang = getElementData ( player, "gang" ) local turfGang = getElementData ( marker1, "getTurfGang", true ) if (turfGang == playerGang) then outputChatBox("Esta base ya pertence a "..turfGang, player, 0, 255, 0, false) else if not getPlayerTeam(player) then return end local team = getPlayerTeam ( player ) if (getTeamName( team ) == "geral") then local playerGang = getElementData ( player, "gang" ) if ( playerGang ) then if ( isTimer ( beachturfTimer ) ) then return end if not (turfGang == playerGang) then if isTimer(floodTimer) then return else outputChatBox("[ALERTA]Estan tomando la base en "..getElementZoneName(marker1)..","..getElementZoneName(marker1,true)) floodTimer = setTimer(function() end, 5000, 1) end end local r, g, b = unpack ( exports [ "gang_system" ]:getGangColor ( playerGang ) ) local turfGang = getElementData ( marker1, "getTurfGang", true ) if turfGang then outputChatBox("Entraste En La Base de "..turfGang..". Espera 2 Minutos Para Poder Conquistar la base Y Ganar la base", player, 0, 255, 0, false) else outputChatBox("Esta base Aun No Pertenese A Nadie. Espera 2 Minutos Para Poder Conquistarla", player, 0, 255, 0, false) end beachturfTimer1 = setTimer ( function ( ) if isElementWithinMarker ( player, marker1 ) then setMarkerColor ( marker1, tonumber(r), tonumber(g), tonumber(b), 100 ) outputChatBox("Felicidades Conquistaste la base!", player, 0, 255, 0, false) triggerClientEvent("onTakeTurf", player) givePlayerMoney ( player, 4000 ) setElementData ( marker1, "getTurfGang", playerGang ) setCameraMatrix(player, 1939.5476074219, -2162.421875, 39.010345458984, 1961.9000244141, -2214.6000976563, 16.10000038147, 0, 70) setTimer(function(player) if isElement(player) then setCameraTarget(player) end end,5000,1,player) end end ,3000, 1 ) end end end end addEventHandler( "onMarkerHit", marker1, MarkerHit1 ) function StopTurf ( player ) if ( isTimer ( beachturfTimer1 ) ) then killTimer ( beachturfTimer1 ); end outputChatBox("Has abandonado la base", source) end addEventHandler ( "onMarkerLeave", marker1, StopTurf ) -- here the code to give things function GiveObjects(player) if (turfGang == playerGang) then setElementData( player,ItemAzar[ math.random(1, #ItemAzar)], 1) end end setTimer ( GiveObjects, 3000, 0, player ) but it gives to me [2013-08-20 16:44:28] WARNING: basesita\serverTurf.lua:111: Bad argument @ 'setElementData' [Expected element at argument 1, got nil]
  19. Thanks Castillo! But it give to me this error and the pickups doesnt spawn [2013-08-10 11:32:22] ERROR: addon_hel\server.lua:10: attempt to call global 'unpackl' (a nil value)
  20. Its Doesnt work Bro :c Give to me 2 warnings and dont spawn the pickups: [2013-08-10 11:15:07] WARNING: addon_hel\server.lua:10: Bad argument @ 'createPickup' [2013-08-10 11:15:07] WARNING: addon_hel\server.lua:11: Bad argument @ 'addEventHandler' [Expected element at argument 2, got boolean] Some help please?
  21. Hello i want to make a script who spawn pickups in 8 minutes but random how can i make this? and when you hit the pickup its being destroyed and create a new one in 8 mins whit another coord? i make this but they code doesnt works local M4Pickup = { {4556,-5444.4333,4555}, {76789,-98766.766,8777}, } function SpawnPicks() createPickup(M4Pickup[ math.random(1, #M4Pickup)], 1),2,1239,300,0) addEventHandler ( "onResourceStart", getRootElement(), SpawnPicks ) setTimer ( SpawnPicks, 480000, 1 )
×
×
  • Create New...