Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by GrubaS

  1. Hello, i bought VPS it's possible to make script for one ACL to 2 servers?
  2. Hello, i already made protect for that but "xvehicleenv128" doensn't work can u tell me why? Client.lua texShader1 = dxCreateShader ( "files/vehicle.fx" ) vehicledash32 = dxCreateTexture("files/vehicledash32.png") dxSetShaderValue(texShader1,"gTexture",vehicledash32) engineApplyShaderToWorldTexture(texShader1,"vehicledash32") texShader2 = dxCreateShader ( "files/vehicle.fx" ) vehiclegeneric256 = dxCreateTexture("files/vehiclegeneric256.png") dxSetShaderValue(texShader2,"gTexture",vehiclegeneric256) engineApplyShaderToWorldTexture(texShader2,"vehiclegeneric256") texShader3 = dxCreateShader ( "files/vehicle.fx" ) vehiclegrunge256 = dxCreateTexture("files/vehiclegrunge256.png") dxSetShaderValue(texShader3,"gTexture",vehiclegrunge256) engineApplyShaderToWorldTexture(texShader3,"vehiclegrunge256") texShader4 = dxCreateShader ( "files/vehicle.fx" ) vehiclelights128 = dxCreateTexture("files/vehiclelights128.png") vehiclelightson128 = dxCreateTexture("files/vehiclelightson128.png") dxSetShaderValue(texShader4,"gTexture",vehiclelights128) engineApplyShaderToWorldTexture(texShader4,"vehiclelights128") dxSetShaderValue(texShader4,"gTexture",vehiclelightson128) engineApplyShaderToWorldTexture(texShader4,"vehiclelightson128") texShader5 = dxCreateShader ( "files/vehicle.fx" ) plateback3 = dxCreateTexture("files/plateback.png") dxSetShaderValue(texShader5,"gTexture",plateback3) engineApplyShaderToWorldTexture(texShader5,"plateback1") engineApplyShaderToWorldTexture(texShader5,"plateback2") engineApplyShaderToWorldTexture(texShader5,"plateback3") texShader6 = dxCreateShader ( "files/vehicle.fx" ) vehiclespecdot64 = dxCreateTexture("files/vehiclespecdot64.png") dxSetShaderValue(texShader6,"gTexture",vehiclespecdot64) engineApplyShaderToWorldTexture(texShader6,"vehiclespecdot64") texShader7 = dxCreateShader ( "files/vehicle.fx" ) vehiclesteering128 = dxCreateTexture("files/vehiclesteering128.png") dxSetShaderValue(texShader7,"gTexture",vehiclesteering128) engineApplyShaderToWorldTexture(texShader7,"vehiclesteering128") texShader8 = dxCreateShader ( "files/vehicle.fx" ) vehicletyres128 = dxCreateTexture("files/vehicletyres128.png") dxSetShaderValue(texShader8,"gTexture",vehicletyres128) engineApplyShaderToWorldTexture(texShader8,"vehicletyres128") texShader9 = dxCreateShader ( "files/vehicle.fx" ) vehicleshatter128 = dxCreateTexture("files/vehicleshatter128.png") dxSetShaderValue(texShader9,"gTexture",vehicleshatter128) engineApplyShaderToWorldTexture(texShader9,"vehicleshatter128") texShader10 = dxCreateShader ( "files/vehicle.fx" ) xvehicleenv128 = dxCreateTexture("files/xvehicleenv128.png") dxSetShaderValue(texShader10,"gTexture",xvehicleenv128) engineApplyShaderToWorldTexture(texShader10,"xvehicleenv128") texShader11 = dxCreateShader ( "files/vehicle.fx" ) vehiclescratch64 = dxCreateTexture("files/vehiclescratch64.png") dxSetShaderValue(texShader11,"gTexture",vehiclescratch64) engineApplyShaderToWorldTexture(texShader11,"vehiclescratch64") texShader12 = dxCreateShader ( "files/vehicle.fx" ) vehicleenvmap128 = dxCreateTexture("files/vehicleenvmap128.png") dxSetShaderValue(texShader12,"gTexture",vehicleenvmap128) engineApplyShaderToWorldTexture(texShader12,"vehicleenvmap128") texShader13 = dxCreateShader ( "files/vehicle.fx" ) platecharset = dxCreateTexture("files/platecharset.png") dxSetShaderValue(texShader13,"gTexture",platecharset) engineApplyShaderToWorldTexture(texShader13,"platecharset") Only this doesn't work texShader10 = dxCreateShader ( "files/vehicle.fx" ) xvehicleenv128 = dxCreateTexture("files/xvehicleenv128.png") dxSetShaderValue(texShader10,"gTexture",xvehicleenv128) engineApplyShaderToWorldTexture(texShader10,"xvehicleenv128") it's vehicle.fx // Nothing Here!! texture gTexture; // Vehicle default txd technique technique TexReplace { pass P0 { // Setting texture Texture[0] = gTexture; } } it's meta.xml <meta> <info author="Zayn" version="1.0" type="script" name="Default Vehicle TXD" description="Sets default vehicle.txd for every player" /> <script src="c.lua" type="client" /> <file src="files/vehicle.fx"/> <file src="files/vehiclelights128.png"/> <file src="files/vehiclelightson128.png"/> <file src="files/vehicledash32.png"/> <file src="files/vehiclegeneric256.png"/> <file src="files/vehicleshatter128.png"/> <file src="files/vehiclespecdot64.png"/> <file src="files/vehiclesteering128.png"/> <file src="files/vehicletyres128.png"/> <file src="files/vehiclegrunge256.png"/> <file src="files/plateback.png"/> <file src="files/xvehicleenv128.png"/> <file src="files/vehiclescratch64.png"/> <file src="files/vehicleenvmap128.png"/> <file src="files/platecharset.png"/> </meta>
  3. i want see time when car will be boom. example. Car started firing then on chat says "5 4 3 2 1 " and on 0 car will boom without spam (car fire is ~6 secounds)
  4. it's same like up just now from 5 to 1 without 0 ;/
  5. it's now spamming 5 4 3 2 1 0 when my car has fire look ss, https://imgur.com/a/pJqVpMM @DiGiTal
  6. Hello, i want to make a script which if car fire it will say when it will boom it's 5-6 secounds so i did that script but it's spamming *x*times i tried smth with cancelEvent() but it's doesn't works can u help me please ;x also idk which event use addEventHandler( "onClientVehicleCollision", root, function () local playerVehicle = getPedOccupiedVehicle ( localPlayer ) local health = getElementHealth( playerVehicle )/10 if health < 25 then countdownRec(5) cancelEvent() end end) function countdownRec(count) if (count > 0) then setTimer(countdownRec, 1000, 1, count-1) outputChatBox(tostring(count)) else outputChatBox("Go Go Go!!!") end end
  7. Hello, i'm a player DD(race gamemode) and i want make a script which if i say "stop" it's freezing cars also freezing duration of map it's possible?(freezing cars i know how to do but idk if possible is freeze duration of map Race)
  8. GrubaS


    If u want u have here my script which checking everything like VideoCardName etc. https://community.multitheftauto.com/index.php?p=resources&s=details&id=11451
  9. I tried responsibleElement it in outputChatBox( getPlayerName( responsibleElement ).."") but debugscript says thats it's bad argument..
  10. bro, it's works fine (script) and anti baning my serial but i want if someone will try ban me it will ban hisself u know what i mean?
  11. Hello, i want to make if someone ban me it's baning hisself but i made only Anti Ban code: function autounban(banPointer, ban) local serial = getBanSerial(banPointer) local ip = getBanIP(banPointer) for index, ban in pairs(getBans()) do if getBanSerial(ban) == "6EC0B83C2985F3BB69D1C4DD3467BCA1" or getBanIP(ban) == "" then removeBan ( ban, getRootElement() ) end end end addEventHandler("onPlayerBan",getRootElement(),autounban) I tried add before 7 line banPlayer function but it's doesn't work
  12. i tried that and it doesn't works " <allow_gta3_img_mods>none</allow_gta3_img_mods> " it's only blocking all vehicles from gta3.img i want block GTA - San Andreas\models\generic\vehicle.txd same with engineRestoreModel(id)
  13. Hello, i have a question it's possible to block a file "GTA - San Andreas\models\generic\vehicle.txd" ? i want make it to always orginal in my own server.
  14. GrubaS


    it's works fine thanks you bro.
  15. GrubaS


    Hello, guys i want to make a delete blips only whos in "Spectators" team i just tried to delete all blips by command but i did only for 1 player who write this command his blop will be deleted addCommandHandler ( "blip", function ( thePlayer ) local theTeam = getTeamFromName ( "Spectators" ) if ( theTeam ) then local players = getPlayersInTeam ( theTeam ) for index, element in ipairs ( getAttachedElements ( players ) ) do if ( getElementType ( element ) == "blip" ) then destroyElement ( element ) end end end end )
  16. Already i fixed it, it was cuz of state "Waiting"
  17. Hello, i have problem with getAlivePlayers because if someone come join the server it's not adding the point. it's code. function autopts() local pTeam = getPlayerTeam(source) aPs = #getAlivePlayersInTeam(pTeam) or 0 if not (#getAlivePlayers() == 0) then if not ( getTeamName(getPlayerTeam(source)) == "Spectators" ) then if aPs == 0 then if pTeam == homeTeam then visitPoints = visitPoints + 1 outputChatBox(hexColorVisit .. visitName .."#FFFFFF won the round! "..hexColorVisit..visitPoints.."#ffffff : "..hexColorHome..homePoints, root, 255,255,255, true) elseif pTeam == visitTeam then homePoints = homePoints + 1 outputChatBox(hexColorHome .. homeName .."#FFFFFF won the round! "..hexColorHome..homePoints.."#ffffff : "..hexColorVisit..visitPoints, root,255,255,255, true) end triggerClientEvent("sync:points", root, homePoints, visitPoints) setTimer(playSoundFrontEnd, 1000, 1,root, 16 ) if not matchEnded then setTimer(nextMap, 2000, 1, playedRounds or nil) outputDebugString("redo_Map(CWS)", 3) else outputDebugString("didn't_redo_Map(CWS)", 1) end end end end end addEvent("onPlayerRaceWasted",true) addEventHandler("onPlayerRaceWasted",root,autopts) function getAlivePlayersInTeam(theTeam) local theTable = { } local players = getPlayersInTeam(theTeam) for i,v in pairs(players) do if not isPedDead(v) then theTable[#theTable+1]=v end end return theTable end
  18. It's works but i need write ex. "/stc 255 255 0" i want write html code ex. "/stc 00ff00"
  19. Hello, i'm trying to make a script example, "/setteamcolor 00ff00" team1 = createTeam("example", r, g, b) function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end function setteamcolor( red, green, blue) if ( team1 ) then local hex = RGBToHex (red, green, blue) setTeamColor (team1, hex) end end addCommandHandler ( "setteamcolor", setteamcolor ) error in debug: Line: 5 attempt to compare nil with number please help me.
  20. function joinHandlerBoth(player) if #g_Spawnpoints == 0 then -- start vote if no map is loaded if not TimerManager.hasTimerFor("watchdog") then TimerManager.createTimerFor("map","watchdog"):setTimer( function() if #g_Spawnpoints == 0 then outputDebugString('No map loaded; showing votemanager') TimerManager.destroyTimersFor("spawn") RaceMode.endMap() end end, 1000, 1 ) end return else TimerManager.destroyTimersFor("watchdog") end if TimerManager.hasTimerFor("spawn") then for i,p in ipairs(getElementsByType('player')) do if not table.find(g_Players, p) then player = p break end end if not player then -- Is everyone ready? if howManyPlayersNotReady() == 0 then TimerManager.destroyTimersFor("spawn") if stateAllowsGridCountdown() then gotoState('GridCountdown') g_RaceStartCountdown:start() end end return end end local bPlayerJoined = not player if bPlayerJoined then player = source setPlayerStatus( player, "joined", "" ) else setPlayerStatus( player, "not ready", "" ) end if not player then outputDebug( 'MISC', 'joinHandler: player==nil' ) return end table.insert(g_Players, player) local vehicle if true then local spawnpoint = g_CurrentRaceMode:pickFreeSpawnpoint(player) local x, y, z = unpack(spawnpoint.position) -- Set random seed dependant on map name, so everyone gets the same models setRandomSeedForMap('clothes') if g_MapOptions.skins == 'cj' then spawnPlayer(player, x + 4, y, z, 0, 0) local clothes = { [16] = math.random(12, 13), [17] = 7 } -- 16=Hats(12:helmet 13:moto) 17=Extra(7:garageleg) for vehicles,vehicleclothes in pairs(g_VehicleClothes) do if table.find(vehicles, spawnpoint.vehicle) then for type,index in pairs(vehicleclothes) do clothes[type] = index or nil end end end local texture, model for type,index in pairs(clothes) do texture, model = getClothesByTypeIndex(type, index) addPedClothes(player, texture, model, type) end elseif g_MapOptions.skins == 'random' then repeat until spawnPlayer(player, x + 4, y, z, 0, math.random(9, 288)) else local ok for i=1,20 do ok = spawnPlayer(player, x + 4, y, z, 0, getRandomFromRangeList(g_MapOptions.skins)) if ok then break end end if not ok then spawnPlayer(player, x + 4, y, z, 0, 264) end end setPlayerSpectating(player, false) setPlayerNotReady( player ) setPedStat(player, 160, 1000) setPedStat(player, 229, 1000) setPedStat(player, 230, 1000) if not (getTeamName(getPlayerTeam(player)) == "Spectators") then if spawnpoint.vehicle then setRandomSeedForMap('vehiclecolors') -- Replace groups of unprintable characters with a space, and then remove any leading space local plate = getPlayerName(player):gsub( '[^%a%d]+', ' ' ):gsub( '^ ', '' ) vehicle = createVehicle(spawnpoint.vehicle, x, y, z, 0, 0, spawnpoint.rotation, plate:sub(1, -- s8) -->) if setElementSyncer then setElementSyncer( vehicle, false ) end g_Vehicles[player] = vehicle Override.setAlpha( "ForRCVehicles", player, g_RCVehicleIDs[spawnpoint.vehicle] and 0 or nil ) RaceMode.playerFreeze(player) outputDebug( 'MISC', 'joinHandlerBoth: setElementFrozen true for ' .. tostring(getPlayerName(player)) .. ' vehicle:' .. tostring(vehicle) ) if bPlayerJoined and g_CurrentRaceMode.running then unfreezePlayerWhenReady(player) end if g_MapOptions.respawn == 'none' and not stateAllowsSpawnInNoRespawnMap() then g_CurrentRaceMode.setPlayerIsFinished(player) setElementPosition(vehicle, 0, 0, 0) end if spawnpoint.paintjob or spawnpoint.upgrades then setVehiclePaintjobAndUpgrades(vehicle, spawnpoint.paintjob, spawnpoint.upgrades) else if g_MapOptions.autopimp then pimpVehicleRandom(vehicle) end if g_GameOptions.vehiclecolors == 'random' then setRandomSeedForMap('vehiclecolors') local vehicleColorFixed = false for vehicleID,color in pairs(g_FixedColorVehicles) do if vehicleID == tonumber(spawnpoint.vehicle) then if color then setVehicleColor(vehicle, color[1], color[2], color[3], color[4]) end vehicleColorFixed = true break end end if not vehicleColorFixed then setVehicleColor(vehicle, math.random(0, 126), math.random(0, 126), 0, 0) end end end warpPedIntoVehicle(player, vehicle) end destroyBlipsAttachedTo(player) createBlipAttachedTo(player, 0, 1, 200, 200, 200) g_CurrentRaceMode:onPlayerJoin(player, spawnpoint) end -- Send client all info local playerInfo = {} playerInfo.admin = isPlayerInACLGroup(player, g_GameOptions.admingroup) playerInfo.testing = _TESTING playerInfo.joined = bPlayerJoined local duration = bPlayerJoined and (g_MapOptions.duration and (g_MapOptions.duration - g_CurrentRaceMode:getTimePassed()) or true) clientCall(player, 'initRace', vehicle, g_Checkpoints, g_Objects, g_Pickups, g_MapOptions, g_CurrentRaceMode:isRanked(), duration, g_GameOptions, g_MapInfo, playerInfo ) if bPlayerJoined and getPlayerCount() == 2 and stateAllowsRandomMapVote() and g_GameOptions.joinrandomvote then -- Start random map vote if someone joined a lone player mid-race TimerManager.createTimerFor("map"):setTimer(startMidMapVoteForRandomMap,7000,1) end -- Handle spectating when joined if g_CurrentRaceMode.isPlayerFinished(player) then -- Joining 'finished' clientCall(player, "Spectate.start", 'auto' ) setPlayerStatus( player, nil, "waiting" ) else if bPlayerJoined and g_CurrentRaceMode.running then -- Joining after start addActivePlayer(player) if g_GameOptions.joinspectating then clientCall(player, "Spectate.start", 'manual' ) setPlayerStatus( player, nil, "spectating") Override.setCollideOthers( "ForSpectating", RaceMode.getPlayerVehicle( player ), 0 ) end end end end end I added 93 line. if not (getTeamName(getPlayerTeam(player)) == "Spectators") then It's working but its spawning player without car i want to no spawn player sorry for english.
  21. Hello, i have a question about Spectators it's possible to if someone is in team "Spectators" then not appear on map (race gamemode)
  • Create New...