Jump to content

Gordon_G

Members
  • Posts

    282
  • Joined

  • Last visited

Everything posted by Gordon_G

  1. Hi, I'm actually trying to make a script that could save the player's screen to a file local s = dxCreateScreenSource ( 1366, 768 ) local b = dxUpdateScreenSource ( s ) if b then -- ... end Is it possible to save the "s" texture to a png file for example ?
  2. Huh... That's boring that we can't use setWeaponProperty. Anyway, thanks.
  3. I have a problem with this thing. Well, when I try to change this property for weapons it's always different. Let's take an example : If I do setWeaponProperty("Deagle", "damage", "poor", 90) It will deal 30 damage to the player. But, if I do setWeaponProperty("Shotgun", "damage", "poor", 10) It will deal 50 damage to the player. I think it has something to do with default weapon's damage but, should I use "onClientPlayerDamage" instead, cancel the event and then apply the damage ? That's pretty fastidious.
  4. @TheMOG is right, you should store the elementData in a client side variable that you actualize when elementData change
  5. You should try to stop the "joinquit" resource
  6. You don't need to be a pro-lua scripter to copy that code and put it in a .lua file. Just read the scripting introduction on the wiki and you'll know what to do.
  7. Je suis un scripteur aguerris bien que j'ai fait une longue pause, je suis d'ailleurs entrain de créer mon propre script Roleplay de A à Z en solo, j'ai du boulot mais c'est vachement intéressant. Je vais passer sur ton discord à l'occasion.
  8. Tu aurais des screens à nous partager ?
  9. Gros travail de modélisation Je suis déjà sur un projet mais si tu as des questions n'hésite pas
  10. Par contre... Le CPU va vraiment être surchargé hein, getElementData va synchroniser entre tous les joueurs du côté serveur ET client, du coup créer autant d'elementdata ça peut créer du lag. Moi je te conseillerais plutôt de le faire avec une table, je ferai un exemple ce soir.
  11. So, if i understand goodly you want to make players spawn in the base after 1 sec ? local GroupName = 'Warriors' function onWasted () if getElementData(source,'Group') == 'Warriors' then setTimer( function (source) setElementDimension( source, 0 ) setElementPosition( source, 215.24719+math.random(1,5), 1861.27917+math.random(5,9), 13.14063 ) setElementInterior( source, 0 ) setPedArmor ( source, 100) setPedFightingStyle ( source, 5) end, 1000, 1, source) end end addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted ) Don't forget that the event is "onPlayerSpawn" so, you are supposed to use spawnPlayer to call this event.
  12. Les seuls vrais "avantages" que peuvent se donner les joueurs sont de passer au travers des objets, sur les serveurs DayZ par exemple pour voler des ressources ou autre. Mais il existe des moyens de les remarquer c'est donc un glitch qui reste assez peu utilisé. Sinon oui, si on compare MTA à SAMP au niveau de la sécurité ça n'a rien à voir.
  13. @Citizen décidément j'avais vraiment tout faux Pour la balise code c'est ce bouton ça va t'ouvrir un champ de saisie et là tu y mets ton code. N'oublie pas de bien sélectionner LUA en tant que syntax (liste déroulante en bas à droite).
  14. Ton tuto n'était pas encore publié lorsque j'ai réalisé mon script, j'ai tout refait moi-même. D'ailleurs je ne l'ai pas précisé mais j'ai tout fait en gui et non pas en DX, les formes géométriques étant donc des images.
  15. @Citizen ça m'apprendra à lire en diagonale, je pensais qu'il voulait simplement résoudre l'erreur, merci à toi
  16. Du coup on peut partager nos panels de login ici ? 100% fait par moi-même : Les couleurs rendent vraiment mal, en vrai ça ressemble plus à ça :
  17. N'oublie pas de mettre la balise code quand tu copie/colle un morceau de script. Bon tout d'abord c'est pas très beau cette mise en forme, même pour toi c'est pas pratique car si plus tard tu veux faire appel à la fonction qu’exécute la commande "bail" tu vas devoir l'insérer une nouvelle fois entièrement dans ton code. function bail ( thePlayer ) Wlevel = getPlayerWantedLevel(thePlayer) Mlevel = getPlayerMoney(thePlayer) if Wlevel == 1 and Mlevel >= 500 then setPlayerMoney (thePlayer,Mlevel - 500) setPlayerWantedLevel(thePlayer, 0) setPlayerTeam (thePlayer, getTeamFromName("Citizens")) elseif Wlevel == 2 and Mlevel >= 1000 then setPlayerMoney (thePlayer,Mlevel - 1000) setPlayerWantedLevel(thePlayer, 0) setPlayerTeam (thePlayer, getTeamFromName("Citizens")) elseif Wlevel == 3 and Mlevel >= 1500 then setPlayerMoney (thePlayer,Mlevel - 1500) setPlayerWantedLevel(thePlayer, 0) setPlayerTeam (thePlayer, getTeamFromName("Citizens")) elseif Wlevel == 4 and Mlevel >= 2000 then setPlayerMoney (thePlayer,Mlevel - 2000) setPlayerWantedLevel(thePlayer, 0) setPlayerTeam (thePlayer, getTeamFromName("Citizens")) elseif Wlevel == 5 and Mlevel >= 2500 then setPlayerMoney (thePlayer,Mlevel - 2500) setPlayerWantedLevel(thePlayer, 0) setPlayerTeam (thePlayer, getTeamFromName("Citizens")) elseif Wlevel == 6 and Mlevel >= 3000 then setPlayerMoney (thePlayer,Mlevel - 3000) setPlayerWantedLevel(thePlayer, 0) setPlayerTeam (thePlayer, getTeamFromName("Citizens")) elseif Wlevel == 0 then outputChatBox("You don't need to pay! (Você não precisa pagar!)", thePlayer) else outputChatBox("You don't have money enough! (Você não tem dinheiro o bastante!)", thePlayer) outputChatBox("Pay $500 for wanted level! (Pague $500 por nível de procurado)", thePlayer) end end addCommandHandler("bail",bail) Là on est sur une mise en forme plus que correcte et on s'y retrouve déjà mieux PS : le problème est résolu, tu as juste à remplacer ton ancien code par le nouveau
  18. Huh, you can't use the takePlayerMoney with root as arg 1 This function is serversided ? Could you provide the entire code ? EDIT : setPedClothes is a useful function, have you added it ?
  19. I've worked about 7 days on a bank roberry system. It would be something like an RPG server where you could have a lot of features. I've firstly created this "gamemode" for myself but, it's been a long time I've started to script and I've never released anything while I've done some goods projects ( COD : WaW Zombies GM, RP GM, new dayZ gamemode ). So, would it be interesting for anyone ? Of course it'll be a 100% open source gamemode.
  20. Ok, I've split the dff and col in two files : Always the same prob but now I know the problem is with the second model.
  21. Hello. So, I've made a little building with 3ds max, dff and txd works fine but there is a bug in the collision file. This is my code : -- CLIENT _models = { {"mapA","mapA","mapA",1784} } for k,v in pairs( _models ) do local dff, txd, col, id = unpack( v ) if col then local col_ = engineLoadCOL ( "models/"..col..".col" ) engineReplaceCOL ( col_, id ) end if txd then local txd_ = engineLoadTXD ( "models/"..txd..'.txd' ) engineImportTXD ( txd_, id ) end if dff then local dff_ = engineLoadDFF ( "models/"..dff..".dff" ) engineReplaceModel ( dff_, id ) end engineSetModelLODDistance( id, 500 ) end This is my meta.xml : <meta> <info author="Gordon_G" name="modls" version="1.0" type="script" /> <file src="models/mapA.dff" /> <file src="models/mapA.txd" /> <file src="models/mapA.col" /> <script src="models/model.replace.lua" type="client" /> </meta> Here, this is my collision file in coleditor : And, when I'm in game : When I'm running in the arrow sense, it's like if there was an invisible wall. But, there is no wall in the coleditor. It's not a shift between the dff and col because the other walls has good collisions. Any help ? I can upload my files if it can help.
  22. Hi, some days ago I made a topic in the scripting dedicated forum and no one could help me. I think this is not my script prob' it's a client's one. So, this is what I have : - I've a pickup in some interior and dimension (int 3, dim 1) - When I enter to this dimension and interior by setElementPosition, setElementInterior, setElementDimension, I can see this pickup - When I go far away this pickup and come back I can not see it anymore - When I restard the resource who creates the pickup I can see it again - When I come back to the interior by setElementPosition, setElementInterior, setElementDimension I can see the pickup again Here's a little video to show you the prob' :
  23. Very nice, I like it. 8/10 (I like HTML panel with video in background too )
  24. *up* I made a video to show you the bug :
×
×
  • Create New...