Jump to content

Citizen

Moderators
  • Posts

    1,803
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Citizen

  1. Please use google translate and tell us again what you are trying to do. I understood you wanted to destroy the vehicle after 3 secs when someone enters but not when he leave the car before the 3 secs. This make no sense so I'm waiting for your explanations.
  2. You must get the ratio of the map you are using for your gui (for exemple 1pixel = 0.5 gta unit so the ratio is 1/0.5) And when the guy click on the image, you have to some maths using the map image ratio, the gui size on the screen and the click position. Show us the image you are using and the line where the image is being drawn (guiCreateStaticImage I guess).
  3. Citizen

    Scoreboard

    Yeah which is in a different resource.
  4. XML tags must always start with a letter.
  5. Citizen

    Nametags

    So you tried this ? dxDrawText ( getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", false, false, false, true ) (Give it a try again, don't forget to restart the resource to apply to modifications) If it's not working, then try this: r, g, b = 255, 255, 255 dxDrawText ( getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", false, false, false, true ) If it's still not working, you are definitly modifying a file that isn't used by the resource you are running (did you extracted race.zip ?)
  6. You can do that if you are using dxDrawText by changing the font scale (7th argument) according to the screen resolution.
  7. The wiki (this is where I started to learn): https://wiki.multitheftauto.com/wiki/Main_Page (Check the right section "Scripting")
  8. No since they didn't provide functions/events to delay/start manually the race from another resource.
  9. 5 possible reasons: 1 - the script file isn't loaded (check the meta) 2 - the MarkerC event is never triggered (I guess from the client side) 3 - you aren't in a vehicle 4 - you didn't tow a trailer or the trailer isn't the 435 one 5 - the team "Without Job" doesn't exist. Tips: - Use outputchabox everywhere in this function you can to see what's going on. (EDIT: exactly like Soldsnake just did) - It's recomended to use client istead of source because source can be faked by a hacker.
  10. Heuu ouai d'accord bienvenue à toi mais hummmm. Ici on ne se présente pas comme si on était sur le forum d'un serveur. Enfin ce que je veux dire, c'est que normalement, on viens ici pour demander de l'aide sur du code ou poser des questions en rapport avec le scripting MTA et que si c'est ton 1er post, dans ce cas, tu te présentes. Mais ravis de voir que de plus en plus de français s'intéressent à MTA qui est (sans vouloir troller) bien meilleurs que SA:MP à tous les niveaux. Cordialement, Citizen
  11. Ok alors ... Comme je ne suis pas là pour t'expliquer comment fonctionne une ressource, je vais juste te donner la solution. Dans un premier temps, on va éditer la meta.xml afin d'y rajouter une "settings" pour le groupe des modérateurs: <meta> ... <settings> ... <setting name="*admingroup" value="Admin,SuperModerator" friendlyname="Admin group list" group="_Advanced" accept="*" examples="Admin,Moderator,SuperModerator" desc="To issue certain commands, the player must belong to one of the groups listed." /> <setting name="*moderatorgroup" value="Moderator" friendlyname="Moderator group list" group="_Advanced" accept="*" examples="Moderator,SuperModerator" desc="To issue certain commands, the player must belong to one of the groups listed." /> ... </settings> ... </meta> Donc pour le gamemode, le groupe modérateur sera le groupe Moderator dans l'acl (tu peux donc rajouter d'autres groupes en séparant par une virgule pour le groupe des modérateurs). Ensuite il faut modifier les commandes pour qu'elles soient aussi accessibles pour les modérateurs: Je te montre juste pour le redo et tu feras pareils pour les 2 autres commandes: Dans le script racevoting_server.lua Le redo original addCommandHandler('redo', function( player, command, value ) if isPlayerInACLGroup(player, g_GameOptions.admingroup) then local currentMap = exports.mapmanager:getRunningGamemodeMap() if currentMap then outputChatBox('Map restarted by ' .. getPlayerName(player), g_Root, 0, 240, 0) if not exports.mapmanager:changeGamemodeMap (currentMap, nil, true) then problemChangingMap() end else outputRace("You can't restart the map because no map is running", player) end else outputRace("You are not an Admin", player) end end ) Le redo modifié (ligne 3 pour l'autorisation et 14 pour changer le texte d'erreur/de refus): addCommandHandler('redo', function( player, command, value ) if isPlayerInACLGroup(player, g_GameOptions.admingroup) or isPlayerInACLGroup(player, g_GameOptions.moderatorgroup) then local currentMap = exports.mapmanager:getRunningGamemodeMap() if currentMap then outputChatBox('Map restarted by ' .. getPlayerName(player), g_Root, 0, 240, 0) if not exports.mapmanager:changeGamemodeMap (currentMap, nil, true) then problemChangingMap() end else outputRace("You can't restart the map because no map is running", player) end else outputRace("You are not an Admin or a Moderator", player) end end ) g_GameOptions.moderatorgroup faisant donc référence à notre dans la meta.xml. J'ai regardé rapidement le gamemode donc j'espère que y a pas besoin de plus à modifier que ça. Cordialement, Citizen
  12. No, but it should since the author probably doesn't have time to keep it up-to-date.
  13. Sorry, I didn't mean't to be mean. It's just that I was looked like a lier because you didn't provide the usefull screenshot you provided at the begining and you also removed this line: exports['scoreboard']:scoreboardAddColumn( "job" , getRootElement() , 20, "job" , 3 ) Which was the code I was talking about by saying "part of the code involved" because it was obviously doing stuff highly related to your problem according to your screenshot. You said that you were trying to put the id column before (so on the left of) the name column and that it didn't work. So I thought the id column was still placed after the name column (so on the right of it). But we could see in the screenshot that it DID work. That's why you said you were lying since the priority for the id column was totally working. I also read the wiki and it didn't provide accurate details on the priority attributes on the columns. So yeah based, on what you said, the 2 lines of code you gave us and the what was written on the wiki page, I ended with the wrong diagnosis. I wouldn't say it wasn't possible yet if you had link the screenshot in the initial post. It was more like advices for your next help requests than blaming you. Hope you won't mind. Regards, Citizen
  14. Citizen

    loadstring

    There is no need to use pcall function just call func like any other function: local func = loadstring("function thisFunction() end") func() --like this By the way as I said, setting the variable to nil will throw errors if the rest of the script is still trying to call that function.
  15. Citizen

    solved

    Yeah because Solidsnake added this or statement: if ( dRPoints < 0 or dRPoints == kRPoints ) then Put it back to this: if dRPoints < 0 then
  16. Next time, you will provide the screenshot earlier, you won't cut part of the code involved in your problem and you won't say the priority isnt working when it's obviously working. Thanks.
  17. From the wiki page for scoreboardAddColumn : So it basically mean you can't put it before the name column. You will have to modify the scoreboard resource to be able to support such modification or just to add directly the id column directly in the render function using the name column as example. I'll give it a look later and do a fork of this script to support this.
  18. Hahaha, it will just make his gui blicking every 30 secs. He wanted it to be hidden: function hideMyGui() guiSetVisible(myGuiElement, false) end And put this line where the gui is shown: setTimer(hideMyGui, 30*1000, 1) The "All-In-One" versiobn to be placed where the gui is shown: setTimer(function () guiSetVisible(myGuiElement, false) end, 30*1000, 1) It's using what we called an anonymous function. They are usefull when you know you will never call that function somewhere else in your script.
  19. For this hudge script ? It will need at least a month for a single scripter to do it from scratch. That's why no one want to do it for 50€ only (I know it's probably a lot for you but it's not what this userpanel really costs).
  20. Citizen

    loadstring

    loadstring("thisFunction = nil")() --Destroy the function 'thisFunction' EDIT: But you will get errors if the rest of the script is still calling it somewhere so just do this instead: loadstring("thisFunction = function () end")()
  21. EDIT: Ok j'avais pas vu la réponse pendant que j'écrivais. Bonne continuation.
  22. Tu as juste changé le port car il était déjà utilisé par autre chose (peut être une autre instance du serveur)
  23. Bah modifie la ressource qui est responsable de ce bind, et change le pour une autre touche ?
×
×
  • Create New...