iFoReX Posted July 23, 2012 Posted July 23, 2012 why the proyectile doesnt shot ? cl-side GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0,0.135,0.2575,0.6017,"Elige un Misil",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,23,188,243,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) col = guiGridListAddColumn(GUIEditor_Grid[1],"Misiles",0.-- s8) --> GUIEditor_Button[1] = guiCreateButton(9,271,188,38,"Elegir",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(9,312,188,38,"Cancelar",false,GUIEditor_Window[1]) GUIEditor_Window[2] = guiCreateWindow(0,0.135,0.1912,0.5217,"Opciones",true) GUIEditor_Button[6] = guiCreateButton(9,158,43,41,"<",false,GUIEditor_Window[2]) GUIEditor_Button[7] = guiCreateButton(49,121,43,41,"^",false,GUIEditor_Window[2]) GUIEditor_Button[8] = guiCreateButton(89,157,43,41,">",false,GUIEditor_Window[2]) GUIEditor_Button[9] = guiCreateButton(50,196,43,41,"v",false,GUIEditor_Window[2]) GUIEditor_Button[10] = guiCreateButton(9,264,133,34,"Cancelar",false,GUIEditor_Window[2]) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) local marker = createMarker(213.9440612793, 1818.9245605469, 5.9,"cylinder",1,0,120,0,140) addEventHandler("onClientMarkerHit",root,function(hitPlayer, matchingDimension) if hitPlayer == getLocalPlayer() then if source == marker then guiSetVisible(GUIEditor_Window[1],true) showCursor(true) end end end ) addEventHandler("onClientResourceStart",resourceRoot,function() local row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText(GUIEditor_Grid[1],row,col,"LanzaMisil 1",false,false) end ) addEventHandler("onClientGUIClick",root,function() if source == GUIEditor_Button[3] then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) elseif source == GUIEditor_Button[1] then local xr,xc = guiGridListGetSelectedItem(GUIEditor_Grid[1]) local item = guiGridListGetItemText(GUIEditor_Grid[1],xr,xc) if item == 'LanzaMisil 1' then triggerServerEvent("CameraM1",getLocalPlayer()) guiSetVisible(GUIEditor_Window[2],true) guiSetVisible(GUIEditor_Window[1],false) addEventHandler("onClientClick",root,tirar) end elseif source == GUIEditor_Button[10] then setCameraTarget(getLocalPlayer()) guiSetVisible(GUIEditor_Window[1],true) guiSetVisible(GUIEditor_Window[2],false) elseif source == GUIEditor_Button[6] then triggerServerEvent("moveLeft",getLocalPlayer()) elseif source == GUIEditor_Button[7] then triggerServerEvent("moveUp",getLocalPlayer()) elseif source == GUIEditor_Button[8] then triggerServerEvent("moveRight",getLocalPlayer()) elseif source == GUIEditor_Button[9] then triggerServerEvent("moveDown",getLocalPlayer()) end end ) function tirar(worldX,worldY,worldZ) local cursorX,cursorY,cursorZ,worldX,worldY,worldZ = getCursorPosition() if not createProjectile(getLocalPlayer(),19,worldX,worldY,worldZ) then outputChatBox("el misil no se pudo crear",getLocalPlayer()) end end sv-side addEvent("CameraM1",true) addEventHandler("CameraM1",root,function() local camera = setCameraMatrix(source,189.95697021484, 2081.3354492188, 26,226.38482666016, 2045.6298828125, 32.410900115967) end ) addEvent("moveLeft",true) addEventHandler("moveLeft",root,function() local x,y,z,lx,ly,lz = getCameraMatrix(source) setCameraMatrix(source,x,y,z,lx,ly+5,lz) end ) addEvent("moveUp",true) addEventHandler("moveUp",root,function() local x,y,z,lx,ly,lz = getCameraMatrix(source) setCameraMatrix(source,x,y,z,lx,ly,lz+5) end ) addEvent("moveRight",true) addEventHandler("moveRight",root,function() local x,y,z,lx,ly,lz = getCameraMatrix(source) setCameraMatrix(source,x,y,z,lx,ly-5,lz) end ) addEvent("moveDown",true) addEventHandler("moveDown",root,function() local x,y,z,lx,ly,lz = getCameraMatrix(source) setCameraMatrix(source,x,y,z,lx,ly,lz-5) end ) elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted July 24, 2012 Posted July 24, 2012 Here it works perfectly. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iFoReX Posted July 24, 2012 Author Posted July 24, 2012 in my server the projectile doesnt shot elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
TAPL Posted July 24, 2012 Posted July 24, 2012 function tirar() local cursorX,cursorY,worldX,worldY,worldZ = getCursorPosition() if not createProjectile(getLocalPlayer(),19,worldX,worldY,worldZ) then outputChatBox("el misil no se pudo crear") end end
iFoReX Posted July 24, 2012 Author Posted July 24, 2012 Doesnt work ur code TAPL elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
iFoReX Posted July 24, 2012 Author Posted July 24, 2012 D: in my server doesnt work DD: elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
TAPL Posted July 24, 2012 Posted July 24, 2012 try function tirar(_,_,_,_,worldX,worldY,worldZ) if not createProjectile(getLocalPlayer(),19,worldX,worldY,worldZ) then outputChatBox("el misil no se pudo crear") end end
iFoReX Posted July 24, 2012 Author Posted July 24, 2012 work work very thank you c: elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now