Jump to content

Nachz

Members
  • Posts

    8
  • Joined

  • Last visited

  • Days Won

    1

Nachz last won the day on March 9 2015

Nachz had the most liked content!

Nachz's Achievements

Newbie

Newbie (1/14)

4

Reputation

  1. Hi everyone, it's been a long time, throught the years I became a developer (I work on back-end, mostly servers app) and I have this interest for modding ET and it would be nice to use silentmod as a base project This project has been inactive for a while and I would like to know if it's planned to release the source code ? Thanks for reading and have a nice day, Kind regards
  2. Thanks for the cvar, I really forgot this one. Also I'm working on something else and the lua module don't want to load so I guess there is a problem with one of these function: function et_Obituary(victim,killer,meansOfDeath) getkiller(victim,killer) end function getkiller(victimID,killerID) local hpkiller = et.gentity_get(killerID,"ps.stats",0) local name = et.gentity_get(killerID,"pers.netname") et.trap_SendServerCommand(victimID,"chat \"^7 "..name.." was at ^1"..hpkiller.." ^7HP when he killed you !\"") -- et.trap_SendConsoleCommand( et.EXEC_APPEND, "readconfig\n" ) -- Pretty sure you don't need readconfig in this situation end end Thanks ! Edit: Right after I posted the code I saw my error ^^ Fixed.
  3. Also I still have few questions but it's not related with lua but with cvars. Like I would like to know why each time people who download the next map will be spectator on the nextmap so they need to choose a new team again only because they downloaded the new map... And is there a way to solve the ui_x86_mp.dll server pure failed error for the player, because few players probably don't know that they need to start the game as administrator to solve this problem. So I don't know if there's a way to solve this problem throught the server. Thanks again for the help
  4. The new getXP fonction you gave me, works pretty well. And I added this to my setskills function: local gamestate = tonumber( et.trap_Cvar_Get('gamestate') ) if gamestate == 0 then et.G_AddSkillPoints(playerID, 0, 500) et.G_AddSkillPoints(playerID, 1, 500) et.G_AddSkillPoints(playerID, 2, 500) et.G_AddSkillPoints(playerID, 3, 500) et.G_AddSkillPoints(playerID, 4, 500) et.G_AddSkillPoints(playerID, 5, 500) et.G_AddSkillPoints(playerID, 6, 500) et.G_AddSkillPoints(playerID, 1, 500) And the good gamestate number was 0, because 1 is for warmup and 0 is for when the game is started. Thanks a lot, my problem is fixed !
  5. Well the lua script can be exploited. I don't know why but during warmup the xp of all player are all under 1000xp so the script still give skill points, but it wont work so it's fine. But after the warmup, when a player die, he respawn and get again skill points plus the XP. Anybody knows how to fix that ? And why the current xp of the player isn't loaded well while warmup... Here is the getXP fonction: function getXP(playerID) return et.gentity_get(playerID, "ps.persistant", 0) end And I don't know if there is a function that only get execute after the warmup and that would do something like this one: function et_ClientSpawn(clientNum, revived, teamChange, restoreHealth) local valXP = getXP(clientNum) if valXP < noexp then setexp(clientNum) end endThanks in advance
  6. Well I only want player to download a pk3 file that contains a modified main.menu. So I take notepad+ and I save an empty file with a .ARENA extension and I add it to my .pk3 ?
  7. Thanks for the fast answer, I will try it Edit: It worked, thanks you Also to you know how to force the client to downlaod a .pk3 files in the etmain folder. The sv_pure only force the client to download pk3 files in the silent folder. Thanks you again
  8. Hi all, I'm working on a lua script that would give xp to new player under 1000xp. So they would have all skills. But I can't make it done... I tried 2 ways and both didn't worked well. My lua is based on a other script between. So I have been using this code for when the player spawn: function et_ClientSpawn(clientNum, revived, teamChange, restoreHealth) local valXP = getXP(clientNum) if valXP < noexp then setexp(clientNum) end end The value of noexp is 1000. This is the first thing I tried (fonction setexp): function setexp(playerID) local name = et.gentity_get(playerID,"pers.netname") local silentguid = et.gentity_get(playerID,"sess.guid") if isBot(playerID) or noGuid(playerID) then return end et.trap_SendServerCommand(-1,"chat \"^nCongratulations ^7"..name.."^n, ^nyou have ^nbeen ^nEXP! \"") et.trap_SendConsoleCommand( et.EXEC_APPEND, "givexp "..silentguid.." SOLD 500 \n" ) et.trap_SendConsoleCommand( et.EXEC_APPEND, "givexp "..silentguid.." MED 500 \n" ) et.trap_SendConsoleCommand( et.EXEC_APPEND, "givexp "..silentguid.." ENG 500 \n" ) et.trap_SendConsoleCommand( et.EXEC_APPEND, "givexp "..silentguid.." FOPS 500 \n" ) et.trap_SendConsoleCommand( et.EXEC_APPEND, "givexp "..silentguid.." COV 500 \n" ) et.trap_SendConsoleCommand( et.EXEC_APPEND, "givexp "..silentguid.." LIGHT 500 \n" ) et.trap_SendConsoleCommand( et.EXEC_APPEND, "givexp "..silentguid.." BATTLE 500 \n" ) et.trap_SendConsoleCommand( et.EXEC_APPEND, "readconfig\n" ) end But I realized that the command givexp use the silent ID when I'm using the Silent GUID because I didn't find any function that allow to get the silent ID. Maybe something that would only take the 8 last characters of the silent GUID could give the Silent ID, but I don't know how. (So I didn't got xp, I only seen the message) so then I tried this using the G_AddSkillPoints... function setskill(playerID) local name = et.gentity_get(playerID,"pers.netname") if isBot(playerID) or noGuid(playerID) then return end et.G_AddSkillPoints("..playerID..", 0, 500) et.G_AddSkillPoints("..playerID..", 1, 500) et.G_AddSkillPoints("..playerID..", 2, 500) et.G_AddSkillPoints("..playerID..", 3, 500) et.G_AddSkillPoints("..playerID..", 4, 500) et.G_AddSkillPoints("..playerID..", 5, 500) et.G_AddSkillPoints("..playerID..", 6, 500) et.G_AddSkillPoints("..playerID..", 1, 500) et.trap_SendServerCommand(-1,"chat \"^nCongratulations ^7"..name.."^n, ^nyou have ^nbeen ^nEXP! Welcome to MC ! \"") et.trap_SendConsoleCommand( et.EXEC_APPEND, "readconfig\n" ) end I think there are something missing, because the lua can get load when I type "/lua_status" I can see it. Thanks for you help Nachz
  9. Welcome to the forums Nachz :)
×
×
  • Create New...