Jump to content

xXNemesiSXx

Members
  • Posts

    54
  • Joined

  • Last visited

Everything posted by xXNemesiSXx

  1. i havent made yet any script to start a resource a specific hour, i am asking if you can make an example! (to implement in in the future or to use it now, dunno! LOL, i don't think that is a complicated script, but i'm a noob)
  2. I have a freeroam/zombies server, it would be nice if you can help me to do a script that starts the resource called "zombies" (by slothman) at a specific game hour.. for example: at midnight it will start the resource zombies and at the sunrise it will stop it i'm a noob in scripting and i don't know how to do this..
  3. This resource is cool, but it needs a car saving system.. can you try to script it? or does anyone know if there is a script that let player park their cars and save them also if the server restarts?
  4. Sorry for triple post, but it is better than open a new thread...! Uff now i've another problem... how can i create a script that start a resource in a prestabilited game hour? for example it starts hay when the game hour is 21:00 and stops it at 00:00...
  5. I saw in some freeroam servers that for first you do a little download and after you download other resources... like this server: GTA IV cars/freeroam/drift/race/stunt
  6. How can i set that you download a resource before the other resources? and can also somebody tell me how can i make a resource that set the camera of the player moving around a point?
  7. Like in the title i've to replace the txd file of the a51_jetdoor object... (ID: 3095) But, i don't know why, i can't find the a51_jetdoor.txd file with IMGTool how can i replace the a51_jetdoor txd file ?
  8. sorry... i cant speak very well english... so... i want to make a script that stop a resource (or more than one) every "x" minutes (for example every 10 minutes) and that start it after "x" minutes (for example 20 minutes) so all the resources are not always running toghether and when a resource starts another resource stops... to reduce the lag... but the script must not stop a random resource, it must stop a resource from a list of names.. if you want to make it, you can also upload it in the community
  9. so if it isnt wrong the script must work... the meta.xml ?
  10. im a noob on scripting but i think that resourceRoot in the event handler is wrong...
  11. i don't want to restart a resource... the script has to stop a resource every "x" time and start it evry "x" time... i'm a noob in scripting and more than a noob with setTimer function..!
  12. also i was making a similar map... look at these:
  13. I've got an idea for laggy servers, like mine A script that loads resource's names that you can change and that stop and start them (alternatly) every "X" time... it will reduce a lot lags...!
  14. i had to fix it in the triggering, but now it works fine now i have only to fade the camera to the player... i will not upload this gamemode in the community, but, if you want i will give it to you to use in your server, if you want
  15. in the last post i'm not explained well... clientside: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Image = {} function startup () GUIEditor_Window[1] = guiCreateWindow(261,109,806,539,"...SCEGLI UNA FAZIONE...",false) guiWindowSetSizable(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Memo[1] = guiCreateMemo(9,26,377,267,"21 dicembre 2012...\nLa data piu' conosciuta sulla faccia di\nquesto misero pianeta.\nFino ad un anno prima andava tutto bene,\nfino a quando, per i classici motivi\ndi soldi, non scoppio' l' ennesima,\ndisastrosa, guerra mondiale.\nFurono usate armi biologiche e nucleari,\nfino ad ottenere questo cazzo di risultato...\nUn mondo di merda ricoperto da zombies di merda\ntenuti in vita da quelle radiazioni e da quei composti \nchimici DI MERDA.\nNegli anni seguenti si sono formate diverse comunita':\ngli Hunters, i Reapers e gli Stalkers.\nIl tuo compito e' quello di entrare a fare parte di uno di questi\ngruppi e di ammazzare quei fottuti zombies.\nChe cosa stai aspettando ancora? e' il tuo momento.",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Image[1] = guiCreateStaticImage(405,27,351,271,"images/mtalogo.png",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(273,346,422,29,"HO SCELTO... VOGLIO FARE PARTE DEI:",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) GUIEditor_Button[1] = guiCreateButton(11,444,250,64,"HUNTERS",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Button[1],"sa-header") GUIEditor_Button[2] = guiCreateButton(269,444,250,64,"REAPERS",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Button[2],"sa-header") GUIEditor_Button[3] = guiCreateButton(529,444,263,64,"STALKERS",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Button[3],"sa-header") addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], warpbasehunters, true ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], warpbasereaper, true ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], warpbasestalkers, true ) end addEventHandler("onClientResourceStart",getResourceRootElement(),startup) addEvent( "onPlayer_Wasted", true ) function player_Wasted() team = getPlayerTeam (source) if team == teamhunters then spawnPlayer(source, the coords of hunters base) end if team == teamreapers then spawnPlayer(source, the coords of reapers base) end if team == teamstalkers then spawnPlayer(source, the coords of stalkers base) end end addEventHandler ( "onPlayer_Wasted", getRootElement(), player_Wasted ) --opens the gui-- function visibile() if (guiGetVisible(GUIEditor_Window[1])) then showCursor(false) guiSetVisible(GUIEditor_Window[1],false) else showCursor(true) guiSetVisible(GUIEditor_Window[1],true) end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), visibile) -------------------- serverside: addEventHandler("onResourceStart", resourceRoot, function() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) repeat until spawnPlayer ( player, -2252.1818847656, 2278.2119140625, 1073.4588623047 ) fadeCamera(player, true) setCameraTarget(player, player) end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) function creaTeams () teamhunters = createTeam ( "Hunters", 0, 255, 0 ) teamreapers = createTeam ( "Reapers", 200, 0, 100 ) teamstalkers = createTeam ( "Stalkers", 200, 0, 100 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), creaTeams ) addEvent( "onPlayer_Wasted", true ) function player_Wasted() team = getPlayerTeam (source) if team == teamhunters then spawnPlayer(source, the coords of hunters base) end if team == teamreapers then spawnPlayer(source, the coords of reapers base) end if team == teamstalkers then spawnPlayer(source, the coords of stalkers base) end end triggerClientEvent ( "onGreeting", getRootElement(), player_Wasted ) is it well done?
  16. ups..! this was the older version where there was also the skinselector however you can answer my question?
  17. OK ! thanks to all...! but now i've to trigger an event from a client script... this is the gui: (clientside script) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Image = {} function startup() GUIEditor_Window[1] = guiCreateWindow(0,0,0.99,1,"...SCEGLI UNA FAZIONE...",true) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Memo[1] = guiCreateMemo(0.0164,0.0517,0.5404,0.56,"21 dicembre 2012...\nLa data piu' conosciuta sulla faccia di\nquesto misero pianeta.\nFino ad un anno prima andava tutto bene,\nfino a quando, per i classici motivi\ndi soldi, non scoppio' l' ennesima,\ndisastrosa, guerra mondiale.\nFurono usate armi biologiche e nucleari,\nfino ad ottenere questo cazzo di risultato...\nUn mondo di merda ricoperto da zombies di merda\ntenuti in vita da quelle radiazioni e da quei composti \nchimici DI MERDA.\nNegli anni seguenti si sono formate diverse comunita':\ngli HUNTERS, i Reaper e gli Stalkers.\nIl tuo compito e' quello di entrare a fare parte di uno di questi\ngruppi e di ammazzare quei fottuti zombies.\nChe cosa stai aspettando ancora? e' il tuo momento.\n",true,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(0.5101,0.1017,0.4836,0.4767,"images/mtalogo.png",true,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(0.0278,0.8267,0.2374,0.1217,"HUNTERS",true,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(0.3851,0.8267,0.2374,0.1217,"REAPER",true,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(0.7172,0.8267,0.2374,0.1217,"STALKERS",true,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(0.2841,0.6783,0.4306,0.0717,"VOGLIO FARE PARTE DEI:",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",false) addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], warpbasehunters, true ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], warpbasereaper, true ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], warpbasestalkers, true ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], selezionaskin, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], selezionaskin, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], selezionaskin, false ) end addEventHandler("onClientResourceStart",getResourceRootElement(),startup) i want that when a player click on a GUIEditor_Button, the serverside script will set you in the relative team... have i to do these? GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Image = {} function startup() GUIEditor_Window[1] = guiCreateWindow(0,0,0.99,1,"...SCEGLI UNA FAZIONE...",true) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Memo[1] = guiCreateMemo(0.0164,0.0517,0.5404,0.56,"21 dicembre 2012...\nLa data piu' conosciuta sulla faccia di\nquesto misero pianeta.\nFino ad un anno prima andava tutto bene,\nfino a quando, per i classici motivi\ndi soldi, non scoppio' l' ennesima,\ndisastrosa, guerra mondiale.\nFurono usate armi biologiche e nucleari,\nfino ad ottenere questo cazzo di risultato...\nUn mondo di merda ricoperto da zombies di merda\ntenuti in vita da quelle radiazioni e da quei composti \nchimici DI MERDA.\nNegli anni seguenti si sono formate diverse comunita':\ngli HUNTERS, i Reaper e gli Stalkers.\nIl tuo compito e' quello di entrare a fare parte di uno di questi\ngruppi e di ammazzare quei fottuti zombies.\nChe cosa stai aspettando ancora? e' il tuo momento.\n",true,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(0.5101,0.1017,0.4836,0.4767,"images/mtalogo.png",true,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(0.0278,0.8267,0.2374,0.1217,"HUNTERS",true,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(0.3851,0.8267,0.2374,0.1217,"REAPER",true,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(0.7172,0.8267,0.2374,0.1217,"STALKERS",true,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(0.2841,0.6783,0.4306,0.0717,"VOGLIO FARE PARTE DEI:",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",false) addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], warpbasehunters, true ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], warpbasereaper, true ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], warpbasestalkers, true ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], selezionaskin, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], selezionaskin, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], selezionaskin, false ) end addEventHandler("onClientResourceStart",getResourceRootElement(),startup) addEvent( "player_Wasted", true ) function player_Wasted() team = getPlayerTeam (source) if team == teamhunters then spawnPlayer(source, the coords of hunters base) end if team == teamreapers then spawnPlayer(source, the coords of reapers base) end if team == teamstalkers then spawnPlayer(source, the coords of stalkers base) end end addEventHandler ( "player_Wasted", getRootElement(), player_Wasted ) serverside script: teamhunters = createTeam ("Hunters", 0, 255, 0 ) teamreapers = createTeam ("Reapers", 200, 0, 100 ) teamstalkers = createTeam ( "Stalkers", 200, 0, 100 ) addEvent( "player_Wasted", true ) function player_Wasted() team = getPlayerTeam (source) if team == teamhunters then spawnPlayer(source, the coords of hunters base) end if team == teamreapers then spawnPlayer(source, the coords of reapers base) end if team == teamstalkers then spawnPlayer(source, the coords of stalkers base) end end addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted )
  18. So... i was trying to detect the player team when he dyes and when he dyes... this is the code: function creaTeams () teamhunters = createTeam ( "Hunters", 0, 255, 0 ) teamreapers = createTeam ( "Reapers", 200, 0, 100 ) teamstalkers = createTeam ( "Stalkers", 200, 0, 100 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), creaTeams ) function player_Wasted () team = getPlayerTeam (source) if team --??? addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) i'm a noob on scripting, and i don't know how to proceed
×
×
  • Create New...