Gordon_G

Members
  • Content Count

    261
  • Joined

  • Last visited

Everything posted by Gordon_G

  1. So ... I can't help you on this script ... It's ... Really hard ... You gave me all the gamemode ... I just want the bugged script Is it your script ?
  2. Yes, it's possible ! -- Server function onElementModelChange () if getElementModel(source) == 45 then giveWeapon(source,42,10000000, true) end end addEventHandler("onElementModelChange", root,onElementModelChange) Something like that ...
  3. vehiclesid = {429, 541, 480 , 411 , 565} changermarker = createMarker(x, y, z, "typeofmarker", size,255, 0, 0, alpha) function MarkerHit( hitElement) if getElementType(hitElement) == "player" then -- getElementType because theElement must be a player if getMarkerColor(source) == 255,0,0 then -- We check the color of the marker local x,y,z = getElementPosition(hitElement) -- Get the position of the player createVehicle(vehiclesid[math.random(1,#vehiclesid)],x,y,z,0,0,getPedRotation(hitElement)) -- The math.random will take an aleatory number in the table 'vehiclesid'. The # count the lines in a table so, like this you can add some other IDs in your table end end end addEventHandler( "onMarkerHit", getRootElement() , MarkerHit) I don't try this but it should work
  4. I don't really understand what do you want to do but ... "menu of RESPAWN", so, a GUI ? If it's that, do you make de cursor visible ? showCursor(true,true) Please, insert your code.
  5. Ok, I will try that when my friend will be here, thanks !
  6. Hello ! So maybe you will think I'm stupide but I have a basic question ... I try to make something like this : server -> client -> server. Show that : -- first : Server function perceporte2(source) pos1,pos2,pos3 = getElementPosition(source) perceporteobject = createObject(3031,pos1,pos2,pos3) triggerClientEvent("perceporteson2",source, pos1,pos2,pos3) end addCommandHandler("perceporte2", perceporte2) -- second : Client addEvent("perceporteson2", true) function perceporteson2(a,b,c) local perceporteson = playSound3D("perce-porte.wav",a,b,c,true) setTimer( function(a) stopSound(perceporteson) triggerServerEvent("portelocked2",localPlayer) end, 1000,1,perceporteson) end addEventHandler("perceporteson2", getRootElement(),perceporteson2) -- third : Server function portelocked2() destroyElement(perceporteobject) end addEventHandler("portelocked2", getRootElement(), portelocked2) It's not exactly what I want to make but it's the idea so, don't say me : "Just make the commandHandler in client script." Ok, the script work but ... When there is two players ... So someone could explain me ? Please
  7. That's work ! And, I learnt to script myself so I don't now everything yet. I am scripting a gamemode and, you helped me a lot triggerClientEvent("achatarmesgui", source) addEventHandler("achatarmesgui", getLocalPlayer(),achatarmes)
  8. Thanks a lot ! I'll immediatly try that
  9. Ok, so ... I will try to explain everything correctly. I try to make a GUI visible by a server script and ... For some reason does that I don't know for the moment everyone see this GUI ... But I just wanna that the source of the server side can see the GUI. You understand ? --Server function seegui(source) triggerClientEvent("achatarmesgui",root, source) end addCommandHandler("seegui", seegui) --Client prixarmes = { neufmm = {1500,22}, tecneuf = {4000,30}, deagle = {3000,24}, ak = {7000,32}, shotgun = {5500,25}, } local screenW, screenH = guiGetScreenSize() achatarmess = guiCreateWindow((screenW - 608) / 2, (screenH - 347) / 2, 608, 347, "Achat armes", false) guiWindowSetSizable(achatarmess, false) guiSetVisible ( achatarmess, false ) eaglei = guiCreateStaticImage(10, 171, 95, 95, "deserteagle.png", false, achatarmess) neufi = guiCreateStaticImage(10, 48, 95, 95, "9mm.png", false, achatarmess) teci = guiCreateStaticImage(142, 52, 95, 95, "tec9.png", false, achatarmess) shotguni = guiCreateStaticImage(261, 52, 95, 95, "shotgun.png", false, achatarmess) aki = guiCreateStaticImage(405, 56, 95, 95, "ak47.png", false, achatarmess) achatarmeslabel1 = guiCreateLabel(20, 143, 75, 17, prixarmes.neufmm[1], false, achatarmess) achatarmeslabel2 = guiCreateLabel(152, 143, 75, 17, prixarmes.tecneuf[1], false, achatarmess) achatarmeslabel3 = guiCreateLabel(20, 276, 75, 17, prixarmes.deagle[1], false, achatarmess) achatarmeslabel4 = guiCreateLabel(271, 143, 75, 17, prixarmes.shotgun[1], false, achatarmess) achatarmeslabel5 = guiCreateLabel(419, 143, 75, 17, prixarmes.ak[1], false, achatarmess) buttonclose = guiCreateButton(569, 23, 29, 25, "X", false, achatarmess) addEvent("achatarmesgui", true) function achatarmes() guiSetVisible(achatarmess, true) showCursor(true,true) end addEventHandler("achatarmesgui", root,achatarmes) So ... Could someone explain me ? Please