Jump to content

bandi94

Members
  • Posts

    1,037
  • Joined

  • Last visited

Everything posted by bandi94

  1. ok i solved this problem if somebody have this problem to you need to : go to options/setings/services/Textures press add and select a empty folder now extract the vehicle.txd and vehicles.txd (GTA San Andreas/models/generic) in that folder and done
  2. sorry for duble post but i realy need help whit Zmodeler how to import/export or change setting's that Zmodeler don't delete the headlighst stoplamp's interior and the existent texture of the car thx
  3. thx and is a way to fix this ? or how i need to import/export the infernus to don't delete it ?
  4. that Next Map ist's show the next map set it from admin panel if you check in the admin panel the race resource there are some option's whit the map you can disable the map voting and on the map end the server random a map but it will not show in the "Next Map" bk the server chose the map only on the current map end so you need to edit the rece resource to random the next map on the curent map start (not on end) and then you edit that "Next Map" to show that map what the race chose for the next map
  5. I have make made an infernus skin (dff) now i have big problem's whit maping txd my problem - Zmodeler if i load the original infernus save it whitout any changes it's delet the original maping ingame the car is only gray headligh's stop light's missing .... so if i save the infernus it's delete the material's so how can i save the infernus that the old maping don't get delleted ? -3D's max ti's very good if the object is straight if the object is curved like the dor then it draw long i mean 20 pixles on all the dor and i draw it long if i put in a white picture a black box then the black box become a black line if somebody can help me if possible whit zModeler thx
  6. @ Draken you like copy past no joke ( i saw you on some post copy paste modifing a timer and .... never mind )
  7. bandi94

    Water function

    @GanJaRuleZ code what is not inside a function is executed on resource start so you dont need a function .... any error in debugscript 3? i don't know i never used createWater
  8. setTimer ( consoleGiveCash, 1000, 1 ) setTimer(function,interval,timetoexecute) you put 1 for timetoexecute and then the tmer after 1 loop its stop you need to put 0 if you wanna that the timer run to infinity or while the resource is stoped function consoleGiveCash ( ) local cx = math.random(5555,1005) setPlayerMoney( getRootElement(), cx ) outputChatBox(" Has Won "..cx.."$" ,root, 255, 255,0,true ) end setTimer ( consoleGiveCash, 1000, 0 )
  9. replace the dxText:create whit guiCreateLabel and "g_dxGUI.timepassed:text" whit guiSetText
  10. server side marker1 = createMarker(934, -1452, 14.5, "arrow", 1.5, 230, 251, 3, 153) function teleport1(player) if getElementType(player)=="player" then local vehicle=getPedOccupiedVehicle(player) setElementPosition(player, -354.3, -3786.8000976563, 16.40000038147) setElementFrozen(player, false) setTimer(setElementFrozen, 1000, 1, player, false) end end addEventHandler("onMarkerHit", marker1, teleport1) marker2 = createMarker(934, -1452, 14.5, "arrow", 1.5, 230, 251, 3, 153) function teleport2(player) if getElementType(player)=="player" then local vehicle=getPedOccupiedVehicle(player) setElementPosition(player, -354.3, -3786.8000976563, 16.40000038147) setElementFrozen(player, false) setTimer(setElementFrozen, 1000, 1, player, false) end end addEventHandler("onMarkerHit", marker2, teleport2)
  11. local money=100 first=false function money(player) if first then givePlayerMoney(player,money) first=false outputChatBox(getPlayerName(player).."was the first and got 100 $") else outputChatBox("You are not the first") end end addCommandHandler(freemoney,money)-- if the player write /freemoney and he is the firs after loading the money then he will get 100 $ function reloadmoney() first=true outputChatBox("Write '/freemoney' and you can won 100$ if you type it fast") end addCommandHandler(startmoney,money) -- if you type startmoney the you will start a new chance to type you can make it whit a timer ex. in every 5 min to load money or how you want
  12. first you need to get the player acco8unt and after it you can edit it you firs't wanna edit it and only after to get the account and the source is comming whit onPlayerWasted you don't need to define it in the function Try this i don't look at the full code i only fix the error in line 3,4 addEventHandler("onPlayerWasted", getRootElement(), function() local playerAccount = getPlayerAccount( source ) if playerAccount then local playerSkin = getAccountData( playerAccount, "player.skin" ) spawnPlayer(2155, -99, 3, 0, playerSkin) for i = 0,17 do local acc = getAccountData( playerAccount, 'player.clothes.'..i ) if not acc:find 'false' then addPedClothes( source,acc:sub( 1,acc:find( ',' ) - 1 ),acc:sub( acc:find( ',' ) + 1,acc:len( ) ),i ) local playerMoney = getAccountData( playerAccount, "player.money" ) local playerWeaponID0 = getAccountData (playerAccount, "player.weaponID0") local playerWeaponID1 = getAccountData (playerAccount, "player.weaponID1") local playerWeaponID2 = getAccountData (playerAccount, "player.weaponID2") local playerWeaponID3 = getAccountData (playerAccount, "player.weaponID3") local playerWeaponID4 = getAccountData (playerAccount, "player.weaponID4") local playerWeaponID5 = getAccountData (playerAccount, "player.weaponID5") local playerWeaponID6 = getAccountData (playerAccount, "player.weaponID6") local playerWeaponID7 = getAccountData (playerAccount, "player.weaponID7") local playerWeaponID8 = getAccountData (playerAccount, "player.weaponID8") local playerWeaponID9 = getAccountData (playerAccount, "player.weaponID9") local playerWeaponID10 = getAccountData (playerAccount, "player.weaponID10") local playerWeaponID11 = getAccountData (playerAccount, "player.weaponID11") local playerWeaponID12 = getAccountData (playerAccount, "player.weaponID12") local playerWeaponAmmo0 = getAccountData (playerAccount, "player.weaponAmmo0") local playerWeaponAmmo1 = getAccountData (playerAccount, "player.weaponAmmo1") local playerWeaponAmmo2 = getAccountData (playerAccount, "player.weaponAmmo2") local playerWeaponAmmo3 = getAccountData (playerAccount, "player.weaponAmmo3") local playerWeaponAmmo4 = getAccountData (playerAccount, "player.weaponAmmo4") local playerWeaponAmmo5 = getAccountData (playerAccount, "player.weaponAmmo5") local playerWeaponAmmo6 = getAccountData (playerAccount, "player.weaponAmmo6") local playerWeaponAmmo7 = getAccountData (playerAccount, "player.weaponAmmo7") local playerWeaponAmmo8 = getAccountData (playerAccount, "player.weaponAmmo8") local playerWeaponAmmo9 = getAccountData (playerAccount, "player.weaponAmmo9") local playerWeaponAmmo10 = getAccountData (playerAccount, "player.weaponAmmo10") local playerWeaponAmmo11 = getAccountData (playerAccount, "player.weaponAmmo11") local playerWeaponAmmo12 = getAccountData (playerAccount, "player.weaponAmmo12") setAccountData( playerAccount, "player.money", playerMoney ) setAccountData (playerAccount, "player.weaponID0", getPedWeapon (source, 0)) setAccountData (playerAccount, "player.weaponID1", getPedWeapon (source, 1)) setAccountData (playerAccount, "player.weaponID2", getPedWeapon (source, 2)) setAccountData (playerAccount, "player.weaponID3", getPedWeapon (source, 3)) setAccountData (playerAccount, "player.weaponID4", getPedWeapon (source, 4)) setAccountData (playerAccount, "player.weaponID5", getPedWeapon (source, 5)) setAccountData (playerAccount, "player.weaponID6", getPedWeapon (source, 6)) setAccountData (playerAccount, "player.weaponID7", getPedWeapon (source, 7)) setAccountData (playerAccount, "player.weaponID8", getPedWeapon (source, -- s8) -->) setAccountData (playerAccount, "player.weaponID9", getPedWeapon (source, 9)) setAccountData (playerAccount, "player.weaponID10", getPedWeapon (source, 10)) setAccountData (playerAccount, "player.weaponID11", getPedWeapon (source, 11)) setAccountData (playerAccount, "player.weaponID12", getPedWeapon (source, 12)) setAccountData (playerAccount, "player.weaponAmmo0", getPedTotalAmmo (source, 0)) setAccountData (playerAccount, "player.weaponAmmo1", getPedTotalAmmo (source, 1)) setAccountData (playerAccount, "player.weaponAmmo2", getPedTotalAmmo (source, 2)) setAccountData (playerAccount, "player.weaponAmmo3", getPedTotalAmmo (source, 3)) setAccountData (playerAccount, "player.weaponAmmo4", getPedTotalAmmo (source, 4)) setAccountData (playerAccount, "player.weaponAmmo5", getPedTotalAmmo (source, 5)) setAccountData (playerAccount, "player.weaponAmmo6", getPedTotalAmmo (source, 6)) setAccountData (playerAccount, "player.weaponAmmo7", getPedTotalAmmo (source, 7)) setAccountData (playerAccount, "player.weaponAmmo8", getPedTotalAmmo (source, -- s8) -->) setAccountData (playerAccount, "player.weaponAmmo9", getPedTotalAmmo (source, 9)) setAccountData (playerAccount, "player.weaponAmmo10", getPedTotalAmmo (source, 10)) setAccountData (playerAccount, "player.weaponAmmo11", getPedTotalAmmo (source, 11)) setAccountData (playerAccount, "player.weaponAmmo12", getPedTotalAmmo (source, 12)) giveWeapon(source, playerWeaponID0, playerWeaponAmmo0, true) giveWeapon(source, playerWeaponID1, playerWeaponAmmo1, false) giveWeapon(source, playerWeaponID2, playerWeaponAmmo2, false) giveWeapon(source, playerWeaponID3, playerWeaponAmmo3, false) giveWeapon(source, playerWeaponID4, playerWeaponAmmo4, false) giveWeapon(source, playerWeaponID5, playerWeaponAmmo5, false) giveWeapon(source, playerWeaponID6, playerWeaponAmmo6, false) giveWeapon(source, playerWeaponID7, playerWeaponAmmo7, false) giveWeapon(source, playerWeaponID8, playerWeaponAmmo8, false) giveWeapon(source, playerWeaponID9, playerWeaponAmmo9, false) giveWeapon(source, playerWeaponID10, playerWeaponAmmo10, false) giveWeapon(source, playerWeaponID11, playerWeaponAmmo11, false) giveWeapon(source, playerWeaponID12, playerWeaponAmmo12, false) else spawnPlayer(2155, -99, 3, 0, math.random(0, 258)) end end end end ) function changeTheSkin( source ) local playerAccount = getPlayerAccount( source ) if playerAccount and not isGuestAccount( playerAccount ) then for i = 0,17 do local arg1,arg2 = getPedClothes( source, i ) setAccountData( playerAccount, "player.clothes."..tostring( i ),tostring( arg1 )..","..tostring( arg2 ) ) end setAccountData( playerAccount, "player.skin", getElementModel( source ) ) outputChatBox("#FF0000*INFO: #0095FFYour skin was successfully saved!", source, 0, 255, 0, true) end end addCommandHandler( "skinsave", changeTheSkin ) addEventHandler( "onPlayerLogin", root, function( ) local playerAccount = getPlayerAccount( source ) if playerAccount then local playerSkin = getAccountData( playerAccount, "player.skin" ) if playerSkin then setElementModel( source, playerSkin ) for i = 0,17 do local acc = getAccountData( playerAccount, 'player.clothes.'..i ) if not acc:find 'false' then addPedClothes( source,acc:sub( 1,acc:find( ',' ) - 1 ),acc:sub( acc:find( ',' ) + 1,acc:len( ) ),i ) end end end end end ) addEventHandler( "onPlayerQuit", root, function( ) local playerAccount = getPlayerAccount( source ) if playerAccount then local playerMoney = getPlayerMoney( source ) setAccountData (playerAccount, "player.weaponID0", getPedWeapon (source, 0)) setAccountData (playerAccount, "player.weaponID1", getPedWeapon (source, 1)) setAccountData (playerAccount, "player.weaponID2", getPedWeapon (source, 2)) setAccountData (playerAccount, "player.weaponID3", getPedWeapon (source, 3)) setAccountData (playerAccount, "player.weaponID4", getPedWeapon (source, 4)) setAccountData (playerAccount, "player.weaponID5", getPedWeapon (source, 5)) setAccountData (playerAccount, "player.weaponID6", getPedWeapon (source, 6)) setAccountData (playerAccount, "player.weaponID7", getPedWeapon (source, 7)) setAccountData (playerAccount, "player.weaponID8", getPedWeapon (source, -- s8) -->) setAccountData (playerAccount, "player.weaponID9", getPedWeapon (source, 9)) setAccountData (playerAccount, "player.weaponID10", getPedWeapon (source, 10)) setAccountData (playerAccount, "player.weaponID11", getPedWeapon (source, 11)) setAccountData (playerAccount, "player.weaponID12", getPedWeapon (source, 12)) setAccountData (playerAccount, "player.weaponAmmo0", getPedTotalAmmo (source, 0)) setAccountData (playerAccount, "player.weaponAmmo1", getPedTotalAmmo (source, 1)) setAccountData (playerAccount, "player.weaponAmmo2", getPedTotalAmmo (source, 2)) setAccountData (playerAccount, "player.weaponAmmo3", getPedTotalAmmo (source, 3)) setAccountData (playerAccount, "player.weaponAmmo4", getPedTotalAmmo (source, 4)) setAccountData (playerAccount, "player.weaponAmmo5", getPedTotalAmmo (source, 5)) setAccountData (playerAccount, "player.weaponAmmo6", getPedTotalAmmo (source, 6)) setAccountData (playerAccount, "player.weaponAmmo7", getPedTotalAmmo (source, 7)) setAccountData (playerAccount, "player.weaponAmmo8", getPedTotalAmmo (source, -- s8) -->) setAccountData (playerAccount, "player.weaponAmmo9", getPedTotalAmmo (source, 9)) setAccountData (playerAccount, "player.weaponAmmo10", getPedTotalAmmo (source, 10)) setAccountData (playerAccount, "player.weaponAmmo11", getPedTotalAmmo (source, 11)) setAccountData (playerAccount, "player.weaponAmmo12", getPedTotalAmmo (source, 12)) setAccountData( playerAccount, "player.money", playerMoney ) end end ) addEventHandler( "onPlayerLogin", root, function( ) local playerAccount = getPlayerAccount( source ) if playerAccount then local playerMoney = getAccountData( playerAccount, "player.money" ) local playerWeaponID0 = getAccountData (playerAccount, "player.weaponID0") local playerWeaponID1 = getAccountData (playerAccount, "player.weaponID1") local playerWeaponID2 = getAccountData (playerAccount, "player.weaponID2") local playerWeaponID3 = getAccountData (playerAccount, "player.weaponID3") local playerWeaponID4 = getAccountData (playerAccount, "player.weaponID4") local playerWeaponID5 = getAccountData (playerAccount, "player.weaponID5") local playerWeaponID6 = getAccountData (playerAccount, "player.weaponID6") local playerWeaponID7 = getAccountData (playerAccount, "player.weaponID7") local playerWeaponID8 = getAccountData (playerAccount, "player.weaponID8") local playerWeaponID9 = getAccountData (playerAccount, "player.weaponID9") local playerWeaponID10 = getAccountData (playerAccount, "player.weaponID10") local playerWeaponID11 = getAccountData (playerAccount, "player.weaponID11") local playerWeaponID12 = getAccountData (playerAccount, "player.weaponID12") local playerWeaponAmmo0 = getAccountData (playerAccount, "player.weaponAmmo0") local playerWeaponAmmo1 = getAccountData (playerAccount, "player.weaponAmmo1") local playerWeaponAmmo2 = getAccountData (playerAccount, "player.weaponAmmo2") local playerWeaponAmmo3 = getAccountData (playerAccount, "player.weaponAmmo3") local playerWeaponAmmo4 = getAccountData (playerAccount, "player.weaponAmmo4") local playerWeaponAmmo5 = getAccountData (playerAccount, "player.weaponAmmo5") local playerWeaponAmmo6 = getAccountData (playerAccount, "player.weaponAmmo6") local playerWeaponAmmo7 = getAccountData (playerAccount, "player.weaponAmmo7") local playerWeaponAmmo8 = getAccountData (playerAccount, "player.weaponAmmo8") local playerWeaponAmmo9 = getAccountData (playerAccount, "player.weaponAmmo9") local playerWeaponAmmo10 = getAccountData (playerAccount, "player.weaponAmmo10") local playerWeaponAmmo11 = getAccountData (playerAccount, "player.weaponAmmo11") local playerWeaponAmmo12 = getAccountData (playerAccount, "player.weaponAmmo12") setPlayerMoney( source, playerMoney ) giveWeapon(source, playerWeaponID0, playerWeaponAmmo0, true) giveWeapon(source, playerWeaponID1, playerWeaponAmmo1, false) giveWeapon(source, playerWeaponID2, playerWeaponAmmo2, false) giveWeapon(source, playerWeaponID3, playerWeaponAmmo3, false) giveWeapon(source, playerWeaponID4, playerWeaponAmmo4, false) giveWeapon(source, playerWeaponID5, playerWeaponAmmo5, false) giveWeapon(source, playerWeaponID6, playerWeaponAmmo6, false) giveWeapon(source, playerWeaponID7, playerWeaponAmmo7, false) giveWeapon(source, playerWeaponID8, playerWeaponAmmo8, false) giveWeapon(source, playerWeaponID9, playerWeaponAmmo9, false) giveWeapon(source, playerWeaponID10, playerWeaponAmmo10, false) giveWeapon(source, playerWeaponID11, playerWeaponAmmo11, false) giveWeapon(source, playerWeaponID12, playerWeaponAmmo12, false) end end )
  13. ok thx now i am more confused if the mapInfo. playedCount it's work's why the mapInfo.lastTimePlayed it return the curent date and don't return the last day ?
  14. hm it's funny i used "mapInfo.playedCount" (played times) and it's work fine in this case i hawe more to work
  15. i made a mapinfo window what include the lastTimePlayed that map now my problem is that it return's the date no problem whit it but it return's the current date not the lastTime Client Side local month ={"January","February","March","April","May","June","Juli","August","September","October","November","December"} function timestampToDate(stamp) local time = getRealTime(stamp) return string.format("%d %s %02d:%02d",time.monthday,month[time.month+1],time.hour-2,time.minute-2) end function handleMapInfo(mapInfo) lastTimePlayed = timestampToDate(mapInfo.lastTimePlayed) or "Unknown" end addEvent("onClientMapStarting",true) addEventHandler("onClientMapStarting",getRootElement(),handleMapInfo)
  16. You use only " xmlNodeSetAttribute( value,"value","none" )" this edit the meta.xml file only in the memory after you edited the xml file you need to save the change's whit "xmlSaveFile" and after you saved it unload it from the memory whit xmlUnloadFile try this function fixRespawnMaps( ) local count = 0 for _, v in pairs( exports.mapmanager:getMapsCompatibleWithGamemode( exports.mapmanager:getRunningGamemode( ) ) ) do local main = xmlLoadFile( ":"..getResourceName( v ).."/meta.xml" ) if main then settings = xmlFindChild( main,"settings",0 ) for i = 0,#xmlNodeGetChildren( settings ) do local node = xmlFindChild( v, "setting", i ) if xmlNodeGetAttribute( node,"value" ) ~= "none" then xmlNodeSetAttribute( node,"value","none" ) xmlSaveFile(main) count = count + 1 end end end if main then xmlUnloadFile(main) end end return count end addCommandHandler( "fixAllMaps", function( player ) if hasObjectPermissionTo( player,"function.setServerPassword",true ) then outputChatBox( "(MAPFIX) You have fixed #FFFFFF"..tostring( fixRespawnMaps( ) ).."#FF6464 maps!",player,255,100,100,true ) else outputChatBox( "(MAPFIX) You don't have the required rights to perform this action!",player,255,100,100 ) end end )
  17. Kenix that scipt is my edited script the race return teh Name whitout the hex color code and my namrtag's need the hex color and then i make that scpit that if in racegamemod if i use getPlayerNAme(player,"hex") then it return the name whit hex color i post that scipt bk if somebody have this problem to then they can use my code i don't need help anymore bk i make it work but thx
  18. function removeColorCoding ( name ) return type(name)=='string' and string.gsub ( name, '#%x%x%x%x%x%x', '' ) or name end _getPlayerName = getPlayerName function getPlayerName ( player,hex ) if hex then return _getPlayerName ( player ) else return removeColorCoding ( _getPlayerName ( player ) ) end end
  19. thx i found a way to make happy both sides race,nametag's i editet the _common.lua and if i ask getPlayerName(player) it return whitout color code's for race don't show in the rankboard and list the color codes if i ask getPlayerName(player,"hex") then it return whit the hex code
  20. Draken i know about this color drawing i use this my problem is when i use in the race gamemode : getPlayerName it return |DGT|Puma if i use getPlayerNAme in another resource it return |DGT|#00ff00Puma my problem is that in the race gamemode getPlayerName return the name whitout hex color's
  21. 1. i edited the race nametag's to draw color text (hex color codes in the name ) now my problem is if i put it in the race/nametags.lua then its not working bk in the race gamemode for getPlayerName it's return the name whitout hex code's if i delet the race/nametags.lua and i run my nametags in a resource then its work's but it draw that old nametag's like in "play" gamemode now my question how can i get "getPlayerName" whit hex code's in race gamemode or how can i disable that old nametag's to be showed only the my nametag's thx 2. i am searching for the text on the map end "Vote for next map starts in .. " now i searched and i found that (i think) it's inside of "RaceMode.endMap()" but i don;t find where is the "endMap()" function if somebody know ? i wanna edit the text color and font thx
  22. Hello i wanna change the text on the map end : "PlayerName is the final survivor" i wanna edit it make it different and .... i searched in all of race gamemode and i don't find the lines where is this text drawing or where is called if somebody know in what lua file is (and the lines ) ? thx
  23. in "play" gamemode you can use it about another gamemodes like "race" have his own spawning system so in race gamemode you can't use just SpawnPlayer this depend on what gamemode you use post what gamemode you use and you will get more help
  24. bandi94

    Need Scripts

    I think Benxamix2 is searching only for money i saw some post and only whit money money money .... About learnin you can read what Kenix give you , you can search tutorials on youtube and you can ask help are many peoples who will help you for free this forum is for helping not for money making ....
×
×
  • Create New...