Jump to content

xeon17

Members
  • Posts

    1,903
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by xeon17

  1. Still dosen't work , nothing in debug..
  2. Hello , i want to create a command for my event system but i have problems with client side of script. So when a player enter the event he have the ElementData ''Evento'' and i wanted for every player in event to delete his fire with hands , so he can't attact with hands if he have elementdata ''soco'' but the client side dosen't work. --Server function AntiSoco ( thePlayer ) -- check player if not (isAllownedPlayer(thePlayer)) then return end local list9 = 0 for _, player in ipairs(getElementsByType("player")) do local isPlayerInEvento = getElementData( player, "Evento" ) if ( isPlayerInEvento) then setElementData(player, "soco", true) outputChatBox("#FFF000[EVENTO]#FFFFFF "..getPlayerName(thePlayer).." Deleted your hands",player, 255, 255, 255, true) list9 = list9 + 1 end end outputChatBox("#FFF000[EVENTO]#FFFFFF You deleted soco of "..list9.." players,", thePlayer, 255, 255, 255, true) end addCommandHandler ("tirarsoco",AntiSoco) --Client function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if weapon == 0 and getElementType(hitElement)=="player" and getElementData( hitElement, "soco" ) then cancelEvent () end end addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), onClientPlayerWeaponFireFunc )
  3. xeon17

    Question

    i'll try it and post later did i created it , will the functions work for the thing i want to create?
  4. xeon17

    Question

    I trought i need to use this function https://wiki.multitheftauto.com/wiki/CreateWeapon
  5. xeon17

    About XML

    It's still hard for me but , i'll check every function . Should i put my xml code in the Lua file , where i created the radar area or there is any way i can save all radar areas on server?
  6. xeon17

    Question

    I don't see anything in the script how to give weapons to peds or to create weapons..
  7. xeon17

    About XML

    Hi guys i want to know how to save color of a radararea in a XML file , for me XML look easiest way to do it because i don't know anything about SQL or Mysql Can anyone give me example to save color of a radar area in xml file , and explain me how everything work. Ty
  8. xeon17

    Question

    Damn , sounds maybe funny but i still no understand ._. this give weapons to peds , i want to create a simple weapon on the ground , in the script isn't stuff like createWeapon , setWeaponTarget etc etc
  9. xeon17

    Question

    I mean to create a gun ( a m4 or sniper ) and the gun should fire on everything ( vehicles with players and on players ) and take their health , the gun should be only fire on elements that are visable or near the gun.. @ About Community I tried but there is nothing , pure nothing about ''aimbot''
  10. xeon17

    Question

    Hello guys i have a question about automatic weapons , how i can create a weapon and the weapons should attact/fire on every player or vehicle that is visible to the weapon , or near the weapon.. I know to make a weapon but the stuff with attacting i don't can anyone give me a example how i can do it , or the sctipt allready exist in the community. Thanks.
  11. The problem is in meta i think but i can't fix it now because i'm on phone
  12. xeon17

    Ban

    You no understand ._. i wan't to create the command to ban players when they are offline
  13. I started the shooter map from the download , but still no work
  14. xeon17

    Ban

    Oh , the outputchatbox is wrong i know i not tried to do something with it. It's from a other version of ban command i created. I Wanted to create a command like /iban (serial of player ) ( number of days how much he'll be banned ) and reason of ban. function banCommand(player, command, id, ...) if(id) then local playerID = tonumber(id) if(playerID) then local target = getPlayerFromID(playerID) if(target) then local args = { ... } local reason = "" for k,v in pairs(args) do reason = reason .. ' ' .. v end if(reason ~= "") then outputChatBox ( "O jogador " .. getPlayerName(target) .. "(" .. id .. ") " .. "foi banido por " .. getPlayerName(player) .. "(" .. (getPlayerID(player) or "???") .. ") -> (motivo:" .. reason .. ").", root, 0, 236, 255) else outputChatBox ( "O jogador " .. getPlayerName(target) .. "(" .. id .. ") " .. "foi banido por " .. getPlayerName(player) .. "(" .. (getPlayerID(player) or "???") .. ").", root, 0, 236, 255) end banPlayer(target, player, reason) else outputChatBox ( "[ERRO] Player (" .. id .. ") não encontrado. ", player, 255, 0, 0) end else outputChatBox ( "[ERRO] ID (" .. id .. ") invalido. ", player, 255, 0, 0) end else outputChatBox ( "[servidor] use: /iban [id] [motivo]", player, 255, 255, 255) end end addCommandHandler("iban", kickCommand, true)
  15. I have a problem , when i click on a room , it say ''No maps '' and in console : destroying , reloading some stuff blablabla
  16. xeon17

    Ban

    Hello , i'm try to create a ban command like /iban serial of player , days , reason The script is before 3 mounths , i found today but still no know to fix if anyone can fix my script please and tell me what's wrong. function banCommand(player, command, serial, strtime ...) local target = getPlayerSerial(target) if(target) then local length = tonumber(strtime) or 2 local args = { ... } local reason = "" for k,v in pairs(args) do reason = reason .. ' ' .. v end if(reason ~= "") then outputChatBox ( "O Serial " .. getPlayerSerial(target) .. "(" .. id .. ") " .. "foi banido por " .. getPlayerName(player) .. "(" .. (getPlayerID(player) or "???") .. ") -> (motivo:" .. reason .. ").", root, 0, 236, 255) else outputChatBox ( "O jogador " .. getPlayerName(target) .. "(" .. id .. ") " .. "foi banido por " .. getPlayerName(player) .. "(" .. (getPlayerID(player) or "???") .. ").", root, 0, 236, 255) end addBan(nil, nil, serial,player,reason,legh) else outputChatBox ( "[ERRO] Player (" .. id .. ") não encontrado. ", player, 255, 0, 0) end else outputChatBox ( "[ERRO] ID (" .. id .. ") invalido. ", player, 255, 0, 0) end else outputChatBox ( "[servidor] use: /iban [serial] [days] [reason]", player, 255, 255, 255) end end addCommandHandler("iban", banCommand , true)
  17. xeon17

    Area51

    Have someone the Area51 map of dayz ?
  18. local spawnLocations = { {2171.90625, 1392.59765625, 10.8203125}, {2265.3674316406, 2398.3068847656, 10.8203125}, {2361.689453125, 2070.2077636719, 10.671875} } local spawnPlayer = function() local chosenSpawnLocation = math.random(1,#spawnLocations) spawnPlayer(source,spawnLocations[chosenSpawnLocation][1],spawnLocations[chosenSpawnLocation][2],spawnLocations[chosenSpawnLocation][3]) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("onPlayerJoin",root,spawnPlayer) local spawnLocations = { {2171.90625, 1392.59765625, 10.8203125}, {2265.3674316406, 2398.3068847656, 10.8203125}, {2361.689453125, 2070.2077636719, 10.671875} } local respawnPlayer = function() local chosenSpawnLocation = math.random(1,#spawnLocations) spawnPlayer(source,spawnLocations[chosenSpawnLocation][1],spawnLocations[chosenSpawnLocation][2],spawnLocations[chosenSpawnLocation][3]) fadeCamera(source, true) setCameraTarget(source, source) setTimer ( respawnPlayer, 5000, 5000, source) end addEventHandler("onPlayerWasted",root,respawnPlayer)
  19. xeon17

    Question

    I no understand much about loops , can you give me a extample please
  20. xeon17

    Question

    outputChatBox("#FFF000[EVENTO]#FFFFFF You given " .. getWeaponNameFromID(weaponID) .. "! to "..NUMBER OF PLAYERS WITH ELEMENT DATA ''Evento'' .." players", thePlayer, 255, 255, 255, true) I think you should understand it now
  21. xeon17

    Question

    I use 5 commands in event , i'll post here one problem is , it output so much chatbox's how much players are in event and it output the wrong number in chatbox everything wong how i make it example : You given sawn off to 11 player(s) in event all there 11 player have a elementdata local list = 0 function giveWeaponCommand ( thePlayer, cmd, weaponID ) if not (isAllownedPlayer(thePlayer)) then return end weaponID = tonumber(weaponID) if not (weaponID) or (weaponID > 46) then outputChatBox("#FFF000[EVENTO]#FFFFFF Invalid weapon ID.", thePlayer, 255,255,255, true) return end for _, player in ipairs(getElementsByType("player")) do local isPlayerInEvento = getElementData( player, "Evento" ) if (isPlayerInEvento) then giveWeapon ( player, weaponID, 9999 ) setPedStat ( player, 73, 1000 ) setPedStat ( player, 75, 1000 ) setPedStat ( player, 71, 1000 ) setPedStat ( player, 75, 1000 ) setPedStat ( player, 77, 1000 ) setPedStat ( player, 78, 1000 ) list = list + 1 outputChatBox("#FFF000[EVENTO]#FFFFFF "..getPlayerName(thePlayer).." Given you a " .. getWeaponNameFromID(weaponID) .. "!", player, 255, 255, 255, true) outputChatBox("#FFF000[EVENTO]#FFFFFF You given " .. getWeaponNameFromID(weaponID) .. "! to "..list.." players", thePlayer, 255, 255, 255, true) end end end addCommandHandler ("gweapon", giveWeaponCommand)
  22. Working good , thanks
×
×
  • Create New...