Jump to content

PatrykPro

Members
  • Posts

    11
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

PatrykPro's Achievements

Square

Square (6/54)

1

Reputation

  1. Nazwa serwera: [PL] Endless War - Polski Serwer Gang Wars | endlesswar.pl Adres IP: mtasa://178.33.54.32:20008 Sloty: 40 Gamemode: Gang Wars / TDM / Freeroam Forum: http://endlesswar.pl Discord: https://discord.io/EndlessWar Przedstawiamy Wam serwer Endless War - jedyny polski serwer MTA typu Gang Wars / TDM z elementami Freeroam'u. Nie jest to kolejny rewolucyjny pseudo RP(G) lub serwer postawiony wyłącznie na skryptach z community i załadowany gigabajtami podmianek. Znużeni powielanymi w kółko tymi samymi pomysłami postanowiliśmy stworzyć miejsce na którym można się wyżyć, postrzelać i odpocząć od zasad roleplay'owych i odczuć oryginalny klimat singlowego San Andreas. Uprzedzając niepotrzebne pytania jest to oficjalny, reaktywowany i poprawiony gamemode. Granie na Endlessie nigdy nie było tak przyjemne! Do wyboru jest 6 gangów: Grove Street Families, Ballas, Los Santos Vagos, Varrios Los Aztekas, Mafia i Policja. Akcja głównie odbywa się na terenach Los Santos. Każda z drużyn posiada unikalne skiny, zestawy broni i siedziby. Na naszym serwerze można podjąć się wielu ciekawych zadań. Czy kiedykolwiek chciałeś/aś napadnąć na bank, ale żaden inny serwer Ci tego nie umożliwił? U nas jest to jak najbardziej możliwe! Wystarczy, ze zbierzesz minimum trzyosobową ekipę z gangu, przebijecie się do pilnie strzeżonego banku i rozpoczniecie napad. Musisz jednak uważać, policja była gotowa na taką ewentualność... Potrzebujesz dodatkowego zastrzyku gotówki? Co powiesz na zwinięcie narkotyków innemu gangowi? Wystarczy że wsiądziesz do Picadora, dojedziesz do siedziby wroga i wrócisz cało z towarem do siebie. Prawda, że proste? Zaatakuj terytorium wroga, by zapewnić swojej drużynie dodatkowe źródło kasy. Odwiedź Ammunation, uzbrój się odpowiednio, weź kilka osób do pomocy i do dzieła! Zmęczony ciągłą walką z innymi graczami? To może się pościgamy? Pojedynek 1v1? Derby? To i wiele innych automatycznych atrakcji znajdziesz na naszym serwerze! Na naszym serwerze jest możliwość wybrania innego celownika, skórki broni, zamontowania tłumika do karabinu i wielu innych tego typu rzeczy. Na serwerze za niską cenę możesz kupić konto VIP. W zamian otrzymasz iPhone'a, który daje Ci dostęp do wielu ciekawych rzeczy, takich jak możliwość spawnu zapisanego przez Ciebie pojazdu, teleportacji gracza do siebie i do niego, możliwości zakupienia broni w dowolnym miejscu, specjalny czat i wiele innych! --- Jest jeszcze wiele innych atrakcji, o których tutaj nie wspomnieliśmy. Także serdecznie Was zapraszamy! Do zobaczenia na serwerze!
  2. What I must do? I'm too weak to script anything. D:
  3. MIKI1785: Still same problem. Anyway it's a 0 interior and still this bug. http://oi58.tinypic.com/194kyp.jpg
  4. Thank you. I'll edit CDM code and I'll check this. EDIT: Nothing happened, or I edited it wrong. Video with my problem: http://youtu.be/jAbBmaH1I0Y
  5. Welcome. How I could block fire and aiming keys in interiors? I'm just getting invisible bug, when a player dies in interior and a player needs to /reconnect to fix that. Or... Maybe somebody knows, how to fix this bug? Thanks for every answer.
  6. Max+: Really big thanks for you! Everything works perfect. Thread can be closed.
  7. Same thing. Script works, but still after respawn the original HUD comes back. >.< Do I need to add this somewhere in gamemode's script? BTW I tested another HUD resource and same problem, so maybe it's something in the script?
  8. I'm too big noob to combine this with CDM script. I'll try tomorrow to do something. D:
  9. I don't know, how to do that. Here is the script of gamemode: --[[ ]] cdm_root = getRootElement() function cdm_initialize() outputDebugString( "Initializing Classic Deathmatch..." ) local teams = getElementsByType( "team" ) if ( #teams < 2 ) then outputDebugString( "* CDM Error: There are not enough teams. Minimum is 2", 1 ) cdm_error = true return end teamRoot = {} for k,v in ipairs(teams) do teamRoot[k] = {} teamRoot[k].name = getElementData( v, "name" ) if ( teamRoot[k].name == false ) then outputDebugString( "* CDM Error: Team #" .. k .. " doesn't have a name.", 1 ) cdm_error = true return end local weapons = getChildren ( v, "weapon" ) teamRoot[k].weapons = {} local str = "" for i,j in ipairs(weapons) do teamRoot[k].weapons[i] = {} teamRoot[k].weapons[i].id, teamRoot[k].weapons[i].ammo = tonumber(getElementData( j, "model" )), tonumber(getElementData( j, "ammo" )) if ( teamRoot[k].weapons[i].id == false ) then outputDebugString( "* CDM Error: All weapon IDs should be numeric.", 1 ) cdm_error = true return elseif ( teamRoot[k].weapons[i].ammo == false ) then outputDebugString( "* CDM Error: All ammo values should be numeric.", 1 ) cdm_error = true return end str = str .. teamRoot[k].weapons[i].ammo .. "x " .. getWeaponNameFromID ( teamRoot[k].weapons[i].id ) .. "\n" end local skins = getChildren ( v, "skin" ) teamRoot[k].skins = {} if ( #skins == 0 ) then teamRoot[k].skins[1] = 0 outputDebugString( "* CDM Warning: No skins were found in team #" .. k .. ". Defaulting to 0.", 2 ) end for i,j in ipairs(skins) do teamRoot[k].skins[i] = tonumber(getElementData( j, "model" )) if ( teamRoot[k].skins[i] == false ) then outputDebugString( "* CDM Error: All skin IDs should be numeric.", 1 ) cdm_error = true return end end local spawnpoints = getChildren ( v, "spawnpoint" ) if ( #spawnpoints == 0 ) then outputDebugString( "* CDM Error: Team #" .. k .. " doesn't have enough spawnpoints. Minimum is 1.", 1 ) cdm_error = true return end teamRoot[k].spawnpoints = {} for i,j in ipairs(spawnpoints) do teamRoot[k].spawnpoints[i] = {} teamRoot[k].spawnpoints[i].posX, teamRoot[k].spawnpoints[i].posY, teamRoot[k].spawnpoints[i].posZ, teamRoot[k].spawnpoints[i].rot = tonumber(getElementData( j, "posX" )), tonumber(getElementData( j, "posY" )), tonumber(getElementData( j, "posZ" )), tonumber(getElementData( j, "rot" )) if ( ( teamRoot[k].spawnpoints[i].posX == false ) or ( teamRoot[k].spawnpoints[i].posY == false ) or ( teamRoot[k].spawnpoints[i].posZ == false ) or ( teamRoot[k].spawnpoints[i].rot == false ) ) then outputDebugString( "* CDM Error: All spawnpoint values should be numeric.", 1 ) cdm_error = true return end end local camera = getChildren ( v, "camera" ) teamRoot[k].camera = {} teamRoot[k].camera.posX, teamRoot[k].camera.posY, teamRoot[k].camera.posZ, teamRoot[k].camera.lookX, teamRoot[k].camera.lookY, teamRoot[k].camera.lookZ = tonumber(getElementData( camera[1], "posX" )), tonumber(getElementData( camera[1], "posY" )), tonumber(getElementData( camera[1], "posZ" )), tonumber(getElementData( camera[1], "lookX" )), tonumber(getElementData( camera[1], "lookY" )), tonumber(getElementData( camera[1], "lookZ" )) if ( ( teamRoot[k].camera.posX == false ) or ( teamRoot[k].camera.posY == false ) or ( teamRoot[k].camera.posZ == false ) or ( teamRoot[k].camera.lookX == false ) or ( teamRoot[k].camera.lookY == false ) or ( teamRoot[k].camera.lookZ == false )) then teamRoot[k].camera.posX, teamRoot[k].camera.posY, teamRoot[k].camera.posZ, teamRoot[k].camera.lookX, teamRoot[k].camera.lookY, teamRoot[k].camera.lookZ = 0, 0, 0, 0, 0, 0 outputDebugString( "* CDM Warning: Something went wrong with the camera in team #" .. k .. " and it's your fault. Defaulting to 0, 0, 0.", 2 ) end teamRoot[k].red, teamRoot[k].green, teamRoot[k].blue = tonumber(getElementData( v, "red" )), tonumber(getElementData( v, "green" )), tonumber(getElementData( v, "blue" )) if (( teamRoot[k].red == false ) or ( teamRoot[k].green == false ) or ( teamRoot[k].blue == false )) then teamRoot[k].red, teamRoot[k].green, teamRoot[k].blue = 255, 255, 255 outputDebugString( "* CDM Warning: Something went wrong with the colors in team #" .. k .. " and it's your fault. Defaulting to 255, 255, 255.", 2 ) end teamRoot[k].display = textCreateDisplay () teamRoot[k].text1 = textCreateTextItem ( getElementData( v, "name" ), 0.5, 0.23, "high", teamRoot[k].red, teamRoot[k].green, teamRoot[k].blue, 255, 2.5 ) teamRoot[k].text2 = textCreateTextItem ( str, 0.5, 0.35, "high", 240, 240, 240, 255, 1.75 ) textDisplayAddText ( teamRoot[k].display, teamRoot[k].text1 ) textDisplayAddText ( teamRoot[k].display, teamRoot[k].text2 ) teamRoot[k].team = createTeam( tostring(teamRoot[k].name), tonumber(teamRoot[k].red), tonumber(teamRoot[k].green), tonumber(teamRoot[k].blue) ) end cdm_error = false outputDebugString( "Done." ) end function cdm_showScreen( player ) local last = getElementData( player, "lastSpawn" ) if ( last == false ) then setElementData( player, "lastSpawn", 1 ) last = 1 end spawnPlayer( player, 10000, 10000, 10000, 0, 0 ) setElementPosition( player, teamRoot[last].camera.posX, teamRoot[last].camera.posY, teamRoot[last].camera.posZ - 100 ) setPedGravity ( player, 0 ) textDisplayAddObserver ( teamRoot[last].display, player ) setCameraMatrix ( player, teamRoot[last].camera.posX, teamRoot[last].camera.posY, teamRoot[last].camera.posZ, teamRoot[last].camera.lookX, teamRoot[last].camera.lookY, teamRoot[last].camera.lookZ ) bindKey ( player, "enter", "down", "Spawn" ) bindKey ( player, "arrow_l", "down", "Next_team", "arrow_l" ) bindKey ( player, "arrow_r", "down", "Previous_team", "arrow_r" ) end function cdm_changeSpawn( player, commandName, key ) local last = getElementData( player, "lastSpawn" ) textDisplayRemoveObserver ( teamRoot[last].display, player ) if ( key == "arrow_l" ) then last = last - 1 else last = last + 1 end if ( last < 1 ) then last = #teamRoot end if ( last > #teamRoot ) then last = 1 end textDisplayAddObserver ( teamRoot[last].display, player ) setElementPosition( player, teamRoot[last].camera.posX, teamRoot[last].camera.posY, teamRoot[last].camera.posZ - 100 ) setCameraMatrix( player, teamRoot[last].camera.posX, teamRoot[last].camera.posY, teamRoot[last].camera.posZ, teamRoot[last].camera.lookX, teamRoot[last].camera.lookY, teamRoot[last].camera.lookZ ) setElementData( player, "lastSpawn", last ) end function cdm_spawn( player ) teamNum = getElementData( player, "lastSpawn" ) textDisplayRemoveObserver ( teamRoot[teamNum].display, player ) unbindKey ( player, "enter", "down", "Spawn" ) unbindKey ( player, "arrow_l", "down", "Next_team" ) unbindKey ( player, "arrow_r", "down", "Previous_team" ) local randSpawn = math.random(1, #teamRoot[teamNum].spawnpoints) local randSkin = math.random(1, #teamRoot[teamNum].skins) local team = getTeamFromName(teamRoot[teamNum].name) setPlayerNametagColor ( player, teamRoot[teamNum].red, teamRoot[teamNum].green, teamRoot[teamNum].blue ) setPedGravity ( player, 0.008 ) spawnPlayer ( player, 0, 0, 1000, 0, 1 ) setTimer( cdm_spawnTwo, 550, 1, player, teamNum, randSpawn, randSkin, team ) end function cdm_spawnTwo( player, teamNum, randSpawn, randSkin, team ) setCameraTarget( player, player ) setPlayerTeam ( player, team ) spawnPlayer ( player, teamRoot[teamNum].spawnpoints[randSpawn].posX, teamRoot[teamNum].spawnpoints[randSpawn].posY, teamRoot[teamNum].spawnpoints[randSpawn].posZ, teamRoot[teamNum].spawnpoints[randSpawn].rot, teamRoot[teamNum].skins[randSkin], 0, 0, team ) createBlipAttachedTo ( player, 0, 2, teamRoot[teamNum].red, teamRoot[teamNum].green, teamRoot[teamNum].blue ) for k,v in ipairs(teamRoot[teamNum].weapons) do giveWeapon ( player, teamRoot[teamNum].weapons[k].id, teamRoot[teamNum].weapons[k].ammo ) end end function cdm_killAll() local players = getElementsByType( "player" ) for k,v in ipairs(players) do if ( isPedDead( v ) == false ) then killPed( v ) end end end function cdm_gamemodeMapStart( startedMap ) cdm_initialize() if ( cdm_error == false ) then local sTime = getElementsByType( "respawn" ) if ( sTime ) then respawnTime = tonumber(getElementData( sTime[1], "time" )) else respawnTime = 4500 end local players = getElementsByType( "player" ) for k,v in ipairs(players) do setElementData( v, "score", 0 ) spawnPlayer( v, 10000, 10000, 10000, 0, 0 ) cdm_showScreen( v ) fadeCamera ( v, true ) end end end function cdm_playerJoin() setElementData( source, "score", 0 ) cdm_showScreen( source ) fadeCamera ( source, true ) end function cdm_playerQuit() destroyBlipsAttachedTo ( source ) end 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 destroyBlipsAttachedTo ( source ) local x, y, z = getElementPosition( source ) local deathBlip = createBlip ( x, y, z, 0, 2, 200, 200, 200 ) if ( getPedOccupiedVehicle ( source ) ) then if ( respawnTime > 200 ) then setTimer( removePedFromVehicle, respawnTime-200, 1, source ) else removePedFromVehicle( source ) end end setTimer( destroyElement, respawnTime, 1, deathBlip ) setTimer( cdm_showScreen, respawnTime, 1, source ) end function destroyBlipsAttachedTo( source ) local elements = getAttachedElements ( source ) for k,v in ipairs( elements ) do if ( getElementType( v ) == "blip" ) then destroyElement( v ) end end end function getChildren ( root, type ) local elements = getElementsByType ( type ) local result = {} for elementKey,elementValue in ipairs(elements) do if ( getElementParent( elementValue ) == root ) then result[ table.getn( result ) + 1 ] = elementValue end end return result end addCommandHandler("Spawn", cdm_spawn) addCommandHandler("Next_team", cdm_changeSpawn) addCommandHandler("Previous_team", cdm_changeSpawn) addEventHandler ( "onPlayerJoin", cdm_root, cdm_playerJoin ) addEventHandler ( "onPlayerQuit", cdm_root, cdm_playerQuit ) addEventHandler ( "onPlayerWasted", cdm_root, cdm_playerWasted ) addEventHandler ( "onGamemodeMapStart", cdm_root, cdm_gamemodeMapStart )
  10. mint3d: Everything works OK. HUD disappears, when I start this script after spawning, but when I start this before spawning, I'm still getting this thing: (original HUD with added HUD)
  11. Welcome. I have a problem with hiding some parts of standard GTA HUD. I would like to hide: - ammo - clock - money - weapon - wanted I'm newbie and I don't know, how to script it. Sorry for my bad english.
×
×
  • Create New...