Jump to content

capitanazop

Members
  • Posts

    127
  • Joined

  • Last visited

Everything posted by capitanazop

  1. yeah but when you shot the recoil don´t shake like counter strike, i wanna create for creating a gm with most dificult.
  2. is possible create a Recoil System Like Counter Strike? bye n sorry for ma english
  3. i wanna a object whit move and if this touch you loose hp.
  4. hi, when i wanna create a object system when you touch a the object in movement you loose hp. what function i need? i search but i dont find any function like OnplayerTouchObject. bye n sorry for ma english
  5. i have an idea when player join create a file in a random resource cache and endcript when players enter read this file and if a banned player ban again if not, can play sorry for ma english
  6. but remember now is not finished and have errors ;D
  7. hi when im triying to create a LvL system example: you kills 5 players and level up to lvl 2 and if you are lvl 2 you hp is now 75 and you armor 15. here is a part of the code, the idea is colaborate and complement the code, and i thinks that script have problem. function cdm_playerWasted( totalAmmo, killer ) setPlayerTeam ( source, nil ) if ( killer) then if ( killer ~= source ) then setElementData( killer, "Kills", getElementData( killer, "Kills" ) + 1 ) setElementData( source, "Deaths", getElementData( source, "Deaths") + 1 ) else setElementData( source, "Deaths", getElementData( source, "Deaths") + 1 ) end local kills = getElementData( killer, "Kills") local maton = getClientName(killer) if (kills == 2 ) then outputChatBox(""..maton.." Level Up! now you´re LvL 2!", killer) elseif (kills == 3 ) then outputChatBox(""..maton.."Level Up! now you´re LvL 3!", killer) elseif (kills == 5 ) then outputChatBox(""..maton.." Level Up! now you´re LvL 4!", killer) elseif (kills == 10 ) then outputChatBox(""..maton.." Level Up! now you´re LvL 5!", killer) elseif (kills == 15 ) then outputChatBox(""..maton.." Level Up! now you´re LvL 6!", killer) elseif (kills == 20 ) then outputChatBox(""..maton.." Level Up! now you´re LvL 7!", killer) elseif (kills == 25 ) then outputChatBox(""..maton.." Level Up! now you´re LvL 8!", killer) elseif (kills == 50 ) then outputChatBox(""..maton.." Level Up! now you´re LvL 9!", killer) end else setElementData( source, "Kills", getElementData( source, "Kills" ) - 1 ) setElementData( source, "Deaths", getElementData( source, "Deaths") + 1 ) and for save that. function onPlayerQuit ( ) -- when a player leaves, store his current Score amount in his account data local playeraccount = getClientAccount ( source ) if ( playeraccount ) then local playerScore = getPlayerScore ( source ) setAccountData ( playeraccount, "exp.lvl", playerScore ) end end function onPlayerJoin ( ) -- when a player joins, retrieve his Score amount from his account data and set it local playeraccount = getClientAccount ( source ) if ( playeraccount ) then local playerScore = getAccountData ( playeraccount, "exp.lvl" ) -- make sure there was actually a value saved under this key (check if playerScore is not false). -- this will for example not be the case when a player plays the gametype for the first time if ( playerScore ) then setPlayerScore ( source, playerScore ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerJoin", getRootElement ( ), onPlayerJoin ) if you find errors or u wanna add stuff,utils etc... to the script post it ;D. bye n sorry for ma english
  8. i have the same problem function KnifeDamage( attacker, weapon, bodypart, targetPlayerName ) if ( weapon == 4 ) then --the knife Player = getLocalPlayer() setElementHealth ( Player, getElementHealth(Player) - 20 ) end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), KnifeDamage ) [09:53:12] ERROR: ...er/mods/deathmatch/resources/diversion/diversion.lua:870: attempt to call global 'getLocalPlayer' (a nil value) [09:53:12] start: Resource 'diversion' started
  9. function KnifeDamage( attacker, weapon, bodypart, targetPlayerName ) if ( weapon == 4 ) then --the knife setElementHealth ( Player, getElementHealth(Player) - 20 ) end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), KnifeDamage ) but this doesnt work plz help me, bye n sorry for ma english
  10. hi well i explane my idea, when in single player you shoot a ped whit the Deagle this fall, i possible creating this in mta? like vc:mp whit the shotguns, y see the insplayeringround function and is player ducked but i dont know if this is usefull. bye n sorry for mah english
  11. -- Desert Eagle Wars[quote][quote][/quote][/quote] -- Coded by Franc[e]sco kills = {} addEventHandler ( "onPlayerWasted", getRootElement(), "OnPlayerDied" ) -- Defining OnPlayerDied function OnPlayerDied ( totalammo, killer, killerweapon, bodypart ) -- Calling OnPlayerDied -- Obtaining nick and color of the killed player local playerid = getClientName ( source ) if ( killer ) then kills[source] = 0 -- Checking if the player suicided if (source == killer) then playerid = "himself" else kills[killer] = kills[killer] + 1 end if (kills[killer] == 5) then outputChatBox("doble kill.", player, 0, 138, 138) end if (kills[killer] == 10) then outputChatBox("triple kill", player, 0, 138, 138) end if (kills[killer] == 15) then outputChatBox("amega kill.", player, 0, 138, 138) end end end -- ################################################################################################################## function PlayerJoin(source) fadeCamera ( v, true ) setTimer( spawnPlayer , 6000 , 1 , source , -2329.7912597656, -1623.5703125, 483.70831298828 ) giveWeapon ( source, 30, 999 ) end addEventHandler("onPlayerJoin", getRootElement(),PlayerJoin) -- ################################################################################################################## i have this error [01:02:18] WARNING: deagle.lua: Bad argument @ 'addEventHandler' - Line: 8 if remove a 1 end o event onplayerwasted i have this error: [01:02:10] SCRIPT ERROR: ...grama/MTA San Andreas/server/mods/deathmatch/resources/deagle/deagle.lua:47: 'end' expected (to close 'if' at line 15) near '<eof>' [01:02:10] INFO: Loading script failed: ...grama/MTA San Andreas/server/mods/deathmatch/resources/deagle/deagle.lua:47: 'end' expected (to close 'if' at line 15) near '<eof>'
  12. hi i start working in a Lvl system based in kills example: 5 kills lvl 1 12 kills lvl 2 26 kills lvl 3 53 kills lvl 4 etc... but i have multiply errors and i start this tread for all intered people in create this system. here go a little code. if ( killer ) then kills[source] = 0 -- Checking if the player suicided if (source == killer) then playerid = "himself" else kills[killer] = kills[killer] + 1 end if getElementData( killer, "score" (source) == 5) then if (kills[killer] == 5) then textDisplayAddObserver ( monsterkill, root ) -- Monsterkill! setTimer ( "textDisplayRemoveObserver", 3000, 1, monsterkill, root ) end if (kills[killer] == 10) then textDisplayAddObserver ( dominating, root ) -- Dominating! setTimer ( "textDisplayRemoveObserver", 3000, 1, dominating, root ) end if (kills[killer] == 15) then textDisplayAddObserver ( godlike, root ) -- GodLike! O_O setTimer ( "textDisplayRemoveObserver", 3000, 1, godlike, root ) end is a part of code of Deagle wars of Francesco but have a lot of bugs. this is the base of create a lvl system if you have a code snippet or something apport to this post plz post ;D. bye and sorry for my english
  13. sorry i change the title of house for translade spanish to english. i fix the code sorry
  14. Respawn a Destroyed Vehicle Whit timer function respawnDetroyedVehicle() setTimer(respawnVehicle, 4000, 1, source) end addEventHandler("onVehicleExplode", getRootElement(), respawnDetroyedVehicle) Define a Pickup house = createPickup(-2333.90234375, -1588.9066162109, 483.16543579102,3,1273) function expedicion(playerSource) setPlayerSkin(playerSource, 123) setPlayerMoney (playerSource, 50000) setPlayerArmor ( playerSource, 20 ) end addEventHandler("onPickupHit", expedicion, house)
  15. is possible but you need create al city`s again and i other place.
  16. hi y tried to create a kill message system like unreal tournament. i used this code y is for cdm gamemode this is the code. function cdm_playerWasted( totalAmmo, killer ) setPlayerTeam ( source, nil ) if ( killer ) then if ( killer ~= source ) then setElementData( killer, "score", getElementData( source, "score" ) + 1 ) else setElementData( killer, "score", getElementData( source, "score" ) - 1 ) end end if (socre[killer] == 5) then outputChatBox("KILLING SPREE!", source, 255, 255, 0) end if (score[killer] == 10) then outputChatBox("< MONSTERKILL >", source, 255, 255, 0) end if (score[killer] == 15) then outputChatBox("HOLY SHIT!", source, 255, 255, 0) end if getElementData( killer, "score", getElementData( source, "score" ) == 2 ) destroyBlipsAttachedTo ( source ) local x, y, z = getElementPosition( source ) local deathBlip = createBlip ( x, y, z, 0, 2, 200, 200, 200 ) if ( getPlayerOccupiedVehicle ( source ) ) then if ( respawnTime > 200 ) then setTimer( removePlayerFromVehicle, respawnTime-200, 1, source ) else removePlayerFromVehicle( source ) end end setTimer( destroyElement, respawnTime, 1, deathBlip ) setTimer( cdm_showScreen, respawnTime, 1, source ) end but dosent work =(. i have this error. =========================================================== = Multi Theft Auto: San Andreas Deathmatch v1.0-dp2 = =========================================================== = Server name : [GTAchile.com]Diverrrrra[lz-chile.com] = Server IP address : = Server port : 22004 = = Log file : ..reas/server/mods/deathmatch/logs/server.log = Maximum players : 32 = MTU packet size : 1264 =========================================================== [15:01:11] Could not parse 'settings.xml' file (Invalid file). Starting with an empty settings registry. [15:01:17] Resources: 122 loaded, 0 failed [15:01:17] Starting resources................. [15:01:17] Server password set to '1234hola' [15:01:18] All Seeing Eye listing enabled. Port 22127 (UDP) must be accessible from the internet [15:01:18] Querying game-monitor.com master server... success! [15:01:18] Server started and is ready to accept connections! [15:01:19] Starting cdm [b][15:01:19] SCRIPT ERROR: ...de programa/MTA San Andreas/server/mods/deathmatch/resources/cdm/cdm.lua:236: 'then' expected near 'destroyBlipsAttachedTo' [15:01:19] INFO: Loading script failed: ...de programa/MTA San Andreas/server/mods/deathmatch/resources/cdm/cdm.lua:236: 'then' expected near 'destroyBlipsAttachedTo'[/b] [15:01:19] start: Resource 'cdm' started [15:01:19] Gamemode 'Classic Death Match' started. [15:01:19] Starting cdm_ls [15:01:20] Starting headshot [15:01:20] Starting deathpickups [15:01:20] start: Resource 'cdm_ls' started [15:01:20] Map 'cdm_ls' started.
  17. this is mi command for join in a team ;D. function jointeam ( playerSource, commandName) setPlayerTeam(playerSource, teamDm) end addCommandHandler ("jointeam", jointeam ) but you need this definitons and events. team = {} teamDm = nil function createTeamsOnStart () teamDm = createTeam ( "Deathmach", 200, 0, 100 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart )
  18. hi i have a question. is possible create a bot using createElement( "player") ??
  19. Thanks man Works! the problem is if you are in a bike you fall but y know how fix setting player un nokable off bike. relly man you save my life
  20. port 22005 is relly nesesary for show my server in the list?
  21. hi i have te same problem in my computer work perfectly but in the dedicate host dont show in the list. i need a especial port open or something? bye sorry for my english
  22. sorry for double posting but i can fix this error and i tried with the ace_gabit function but get multiply errors X_X plz can somebody help me? bye and thanks for read
  23. o sorry i view this example 1000 times but never view the remove player of team . thanks man
  24. hi i can find any function to remove a player of team. plz help y urgent! bye and sorry for my english
  25. hi i wanna edit the weapon damage increase and decrease what function i need? bye sorry for my english
×
×
  • Create New...