Jump to content

Darkwarrior Diesel

Members
  • Posts

    24
  • Joined

  • Last visited

About Darkwarrior Diesel

  • Birthday 11/03/1994

Details

  • Gang
    grove street
  • Location
    Mauritius

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Darkwarrior Diesel's Achievements

Civilian

Civilian (7/54)

0

Reputation

  1. salut les amis. bon, j'ai voulu faire un script qui vas mettre un joueur dans son "Team" de quil entrera dan le jeux.Mais le problem est que sa ne marche pas. quand je presse Tab, je vois les teams, mais les joueurs ne sont pas dan leur team respectable, meme pas dans le team "Others". voici le code function createTeamOnStart() AdminTeam = createTeam("Admin",0,255,0) SModTeam = createTeam("SuperModerator",255,0,0) ModTeam = createTeam("Moderator",0,0,255) TModTeam = createTeam("T-Mod",251,253,254) OtherTeam = createTeam("Others",0,0,0) end addEventHandler("onResourceStart",resourceRoot, createTeamOnStart) function setTeamPlayer () if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then setPlayerTeam(source,AdminTeam) end elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then setPlayerTeam(source,SModTeam) end elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then setPlayerTeam(source,ModTeam) end elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("T-Mod")) then setPlayerTeam(source,TModTeam) end else setPlayerTeam(source,OtherTeam) end end addEventHandler("onPlayerLogin", getRootElement(), setTeamPlayer) voice le acl : "Everyone"> "Default"> "user.*"> "resource.*"> "Moderator"> "Moderator"> "resource.mapmanager"> "resource.resourcemanager"> "resource.votemanager"> "user.tiger"> "user.diesel"> "SuperModerator"> "Moderator"> "SuperModerator"> "user.The_Noob"> "resource.mensajeglobal"> "user.peneflacido"> "Admin"> "Moderator"> "SuperModerator"> "Admin"> "RPC"> "resource.admin"> "resource.webadmin"> "user.Sangara"> "user.[Dark][Warrior]"> "user.|HC|heladoslaputeria"> "resource.redirection_command"> "resource.Tags_bySangara"> "resource.peaso"> "user.|HC|Heladoslaputeria"> "resource.kicklogout"> "resource.Anti_spam"> "resource.c-panel"> "user.ming"> "resource.anti_spam"> "resource.admin_panel"> "user.Riddy"> "resource.treasure"> "Console"> "Moderator"> "SuperModerator"> "Admin"> "RPC"> "user.Console"> "RPC"> "RPC"> "MapEditor"> "Default"> "MapEditor"> "resource.editor_main"> "resource.edf"> "raceACLGroup"> "Default"> "raceACL"> "resource.race"> "DevGroup"> "DevACL"> "T-Mod"> "T-Mod"> "user.Juan~>"> "resource.mensajeglobal"> "user.DavidWarFare"> meme sans les "end", sa ne marche pas merci pour votre aide les amis, passer une bonne journée et a+
  2. voila voila function enSortant () local playeraccount = getPlayerAccount(source) if (playeraccount) and not isGuestAccount(playeraccount) then local playermoney = getPlayerMoney(source) setAccountData(playeraccount, "argent.actual", playermoney) local x,y,z = getElementPosition(source) setAccountData(playeraccount, "x.position", x) setAccountData(playeraccount, "y.position", y) setAccountData(playeraccount, "z.position", z) end end function enEntrant(_, playeraccount) if (playeraccount) then local playermoney = getAccountData(playeraccount, "argent.actual" ) local x = getAccountData(playeraccount, "x.position" ) local y = getAccountData(playeraccount, "y.position" ) local z = getAccountData(playeraccount, "z.position" ) if (playermoney) then setPlayerMoney(source, playermoney) setElementPosition(source,x,y,z) end end end addEventHandler("onPlayerQuit", getRootElement (), enSortant ) addEventHandler("onPlayerLogin",getRootElement (), enEntrant ) je l'ai testé et sa marche . par contre je voudrais vous posez quelque question : 1)dans la quatrieme line, pourquoi il a utilisé source, au lieu de playeraccount comme argument pour getPlayerMoney ?? 2) pourquoi il a utilisé "_" dan le fonction enEntrant, à coté de playeraccount?? merci poto
  3. Salut mon ami sava?? oui jai pu le faire O_O mais pas encore tester, pour la simple raison que ces derniers jours, j'étais tres occuper avec les demarches pour pouvoir aller à l'université mais bon, des que je l'aurais tester, je vous le montrerais Passer une bonne journée mon ami, et a+
  4. Non non non j'ai deja commencer avec les bases, mais avec la version anglaise. mais je dois dire que c'était pas facile à comprendre quand meme. Toutefois j'essaye de faire mon mieux pour arriver à comprendre Citizen, faut que j'ajoute aussi que j'aime vos explication C'est tres tres tres claire à comprendre. moi aussi j'avais tres mal à comprendre les setElementData et getElementData, mais apres ce que j'ai lu sur cette article : viewtopic.php?f=128&t=66890 j'ai tres bien compris, et ouiiiiiiiiiii.. tous sa grace à vous Merci enormement trés cher ami. Je vous dis merci pour tout, et je vais essayer de faire ce que vous m'avez dit A tres bientot mon cher ami, et je vous souhaite une tres bonne journée. A+
  5. bonjour les amis. Pour commencer, veuillez m'excuser pour mon terrible francais Bon, je voudrais savoir comment on fait pour sauvegarder les données d'un joueur ?? Et sa ce sauvegarde ou!??? Par exemple, si je veux qu'on sauvegarde le dernier lieu où le joueur été avant quil quitte le jeux et dès quil revient dans le jeux, ben il sera là ou il etait la derniere fois. je connais le francais et l'anglais aussi, mais j'ai beaucoup de mal à comprendre l'anglais c'est pour sa que je n'arrive pas à comprendre ce qui est ecrit à wiki. Certains mon dit qu'il est preférable de telecharger les resources que j'en ai besoin à la communauté, mais je veux faire tout mes scripts moi meme. je ne veux rien telecharger, suis determiner à les faire moi meme. Aider moi s'il vous plait Mersi beaucoup et passer une bonne journée
  6. Thnks a lot guys these are going to be very helpful for me, but my last question is, how to make the ped follow u, i mean when he sees u, he comes towards u and then fire at u, or start to punch u !!??
  7. Vanlot, i understand u bro, thnk u but bro my problem with slothbot is that its not me who created that, and my aim is to create all my resources even if it will take lots of time. Bro, if whenever i want to make a script and anyone tells me to use this and that resource, then i will never be able to script (( i want to make my own. Slothbot resource is great, i like it very much, but if i use this resource, i will never learn then this is a challenge, and i want to face it !!!! Vanlot, thnks for trying to help me bro
  8. my friend, thnk u but it does not include functions that the ped will follow u and tries to kill u
  9. noo i dont want to use the slothbot resource, i want to make my own.
  10. Hello ladies and gentleman As the title says, i want that when a player types a command...hmm.. lets say /killmadafaca nah, we are not some psycho so lets say /killtime . yea, sounds stupid and dumb, but its time to kill lets get back to the topic plz !! or, instead of a command, i could also use a colshape and and when the player enters in it, a GUI will appear. yes there will be a button for the player to accept whether he wants to fight or not, and when the player press tit he or she will be spawn in a specific place. and at that specific moment, some peds will be spawn near him, or in the specific place, and all the player will have to do is smash all these poolooolooots (poolooolooots mean idk some gay peds, its still an unknown word ) no, i dont want u to do the script 4 me cause im learning, not downloadin scripts and put it in my game!!! Well, now that im thinkin, its a pretty idea to make this into a job ---- the punisher sounds great the player will have to kill some stupid peds, yeah the peds will attack him too, and if the player has successfully killed all the ped, another ped will come to him the most powerful ped ever existed and if the player succeeds to kill him, he becomes a fuckin millionaire or, he unlock another stage, where he will have to kill another bunch of noobs again and get his money. end of story now my friends,all i want to ask u is how to proceed, cause i really want to make this, im determined to do that. you are pros, and im still a beginner. thats y i need ur advice wat functions should i use for the ped to follow u and attack u how to unlock another killin mission, by usin a sort of experience. if the player succeeds in the first mission, he receives some money and most important, a number of experience that he will need to unlock another mission!! ? and if yes for the experience, how to save it so that when the player quits and come back into game, he gets back his experience ? Thank u soo much my friends,have a nice journey
  11. Thnks Wei, it works and thnk u for tryin to help me solid thnks a lot guys
  12. hi again guys this time, i made a gui, and want it to appear when player press the f2 key and if window is already visible, the window disappears. but man, i think im doing it all wrong heres the code : -- makin a rules window, second type, with a f2 bind key --a simple rules window, with an accept button and a list of all the server rules and information -- however, instead of relative, we gonna use absolute position values !!! -- as noted in previous tutorials, all the gui must be made client side --makin the window --create the window that will hold our gui creation code local sWidth, sHeight = guiGetScreenSize() local Width,Height = 445,445 local X = (sWidth/2) - (Width/2) local Y = (sHeight/2) - (Height/2) rulesWindow = guiCreateWindow(X,Y,Width,Height,"Rules",false) guiWindowSetMovable(rulesWindow,false) guiWindowSetSizable(rulesWindow,false) -- next we will add the label to the centre of our window that our rules will be displayed on -- we set the text of the label to our rules rulesLabel = guiCreateLabel(10,25,425,359,[[ Welcome to my mta server! Please carefully read the rules before accepting. By accepting the rules, you are agreeing to play by them. Anyone caught breakin these rules will be kicked and/or banned from this server. 1: No cheating. 2: No bug abuse. 3: No mods to your game. 4: No flaming. 5: Respect other players. 6: Be nice!]],false,rulesWindow) --set the horizontal alignment of your label to centre, : in the middle of the window -- also the final argument is true, which means, it will turn on wordwrap guiLabelSetHorizontalAlign(rulesLabel,"center",true) guiSetVisible(rulesWindow, false) function resourceStart () bindKey ("F2", "down", showHelp) end addEventHandler ("onClientResourceStart",getResourceRootElement(getThisResource()),resourceStart) function showHelp () visableOrNot = guiSetVisible (rulesWindow) if (visableOrNot == true) then guiSetVisible (rulesWindow, false) elseif (visableOrNot == false) then guiSetVisible (rulesWindow,true) end end Thnks for u help guys
  13. hi guys Thing is, either i dont understand english well, or i did some stupid error in typing. https://wiki.multitheftauto.com/wiki/In ... _the_click mta wiki says add the eventHandler in the createLoginWindow function, so i added it! but my button is not workin and no errors in debugscript my code -- makin a login window -- makin a simple window with 2 input boxes and a button -- window will appear when the player joins the game -- once button is clicked, player is spawned -- Drawin the window --all the gui must be made client side, its a good practice to keep all client scripts in a separate folder function createLoginWindow() -- we could have locally define our x,y, width and height for the position of the window, but i prefer to use it directly, i mean usin it in the window creation function wdwLogin = guiCreateWindow(0.375,0.375,0.25,0.25, "Please Log In", true) --we created our window and save its element value into the variable "wdwLogin" --final argument passed to guiCreateWindow is true, meanin the coordinates and dimensions of the window are relative, which means that they are a percentage of the total screen size --.now we could have define more x,y, width and height for our label, but lets do it directly guiCreateLabel(0.0825,0.2,0.25,0.25, "username", true, wdwLogin) guiCreateLabel(0.0825,0.5,0.25,0.25, "password",true, wdwLogin) -- now lets create our edit boxes, but without defining the dimensions (x,y,..) edtUser = guiCreateEdit(0.415,0.2,0.5,0.15, "", true, wdwLogin) edtPass = guiCreateEdit(0.415,0.5,0.5,0.15, "", true, wdwLogin) guiEditSetMaxLength(edtUser, 15) guiEditSetMaxLength(edtPass, 15) --the button now btnLogin = guiCreateButton(0.415,0.7,0.25,0.2, "Log in", true, wdwLogin) -- make the window invisible guiSetVisible(wdwLogin, false) --add our onClientGuiClick event to the button we just created addEventHandler("onClientGuiClick", btnLogin, clientSubmitLogin, false) end --this is a log in window, so we need to show the window when the player joins the game, and this can be done using the onClientResourceStart --attach the event handler to the root element of the resource --this means it will only trigger when its own resource is started addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () -- create the log in window and its components createLoginWindow() outputChatBox("Welcome to my mta sa server, please log in") --this is important now! --how to know if the gui was successfully created or not --by usin this : if (wdwLogin ~= nil ) then -- if the gui isnt nil, meanint its true, that is it was created guiSetVisible(wdwLogin, true) else -- the gui wasnt well created or did not create !!! outputChatBox("an unexpected error has occured, and the log in guyi has not been created.") end --enable the players cursor showCursor(true) -- set the input focus onto the gui, allowin players to press T without the chatbox opening guiSetInputEnabled(true) end ) -- create the function and define the 'button'and 'state'parameters -- these are passed automatically by onClientGuiclick function clientSubmitLogin(button,state) -- if our login button was clicked with the left mouse and the state of the mouse button is up if button == "left" and state == "up" then -- get the text entered in the username and password field local username = guiGetText(edtUser) local password = guiGetText(edtPass) --if the username and password both exist if username and password then -- trigger the server event submitLogin and pass the username and password to it triggerServerEvent("submitLogin", getRootElement(), username, password) -- move the input focus back onto the game(allowin players to move around, open the chatbox, etc) guiSetInputEnabled(false) guiSetVisible(wdwLogin, false) showCursor(false) else -- otherwise, output a message to the player, do not trigger the server -- and do not hide the gui outputChatBox("Please enter a username and password.") end end end yup no errors in debugscript help me plz thanks in advance guys
  14. can u help me plz Noki, wat u mean by configured it correctly ??? how u do that ??
×
×
  • Create New...