Jump to content

A3kri

Members
  • Posts

    84
  • Joined

  • Last visited

Everything posted by A3kri

  1. A3kri

    [Help] gui close

    ty, but it didnt work this is my killed function spawnWasted(player) triggerClientEvent ( "Teams", getRootElement(), "Choose your new teams !" ) takePlayerMoney ( player, 500 ) end and this is my gui addEventHandler ( "onClientGUIClick", root, function ( button ) if button == "left" then if source == send then local row, col = guiGridListGetSelectedItem ( teamsList ) local teamName = guiGridListGetItemText ( teamsList, row, col ) triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(), teamName ) addEvent( "Teams", true ) addEventHandler( "Teams", getRootElement(), greetingHandler ) guiSetVisible ( JobsWin , false ) guiSetInputEnabled ( false ) showCursor ( false ) end end end) and the whole gui file --[[Panel created by: [FOTL]Danny]]-- --[[On 17th August 2011]]-- x,y = guiGetScreenSize() JobsWin = guiCreateWindow(x/3 - 170,y/3 - 20,200,320,"لوحة إختيار الفريق",false) teamsList = guiCreateGridList(0,22,186,255,false,JobsWin) column = guiGridListAddColumn( teamsList, "Teams", 0.85 ) for id, team in ipairs(getElementsByType("team")) do local row = guiGridListAddRow ( teamsList ) guiGridListSetItemText ( teamsList, row, 1, getTeamName ( team ), false, false ) guiGridListSetItemColor ( teamsList, row, 1, getTeamColor ( team ) ) end guiWindowSetMovable ( teamsList, false ) guiWindowSetMovable ( JobsWin, false ) guiWindowSetSizable ( teamsList, false ) guiWindowSetSizable ( JobsWin, false ) send = guiCreateButton(0,280,190,25,"Select - إختيار",false,JobsWin) guiSetVisible(JobsWin, true) showCursor(true) setTimer ( showingTeams, 1000, 1) addEventHandler ( "onClientGUIClick", root, function ( button ) if button == "left" then if source == send then local row, col = guiGridListGetSelectedItem ( teamsList ) local teamName = guiGridListGetItemText ( teamsList, row, col ) triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(), teamName ) addEvent( "Teams", true ) addEventHandler( "Teams", getRootElement(), greetingHandler ) guiSetVisible ( JobsWin , false ) guiSetInputEnabled ( false ) showCursor ( false ) end end end) addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), close) what is wrong ? help please
  2. A3kri

    [Help] gui close

    thanks you very much, it's working great. I have another problem if u could help me please ... the function of when u get killed is this function spawnWasted(player) repeat until spawnPlayer ( player, -2655.02, 625.30, 14.45, 180, math.random(19,25) ) fadeCamera(player, true) setCameraTarget(player, player) setPlayerTeam (player, nil) takePlayerMoney ( player, 500 ) end I want when u get killed the gui of choosing a team reopens ( the gui in the last post u solved ) ---- I have another problem ( sorry for taking ur time ) my spawning file is this local teamsTable = { [ "Police" ] = { 1577 , -1694 , 6 } , [ "Destructive" ] = { 2498 , -1684 , 13 } , [ "Rebel" ] = { 1474 , -2247 , 13 } , } addEvent ( "onPlayerChooseTeam" , true ) addEventHandler ( "onPlayerChooseTeam" , root , function ( teamName ) local team = getTeamFromName ( teamName ) setPlayerTeam ( source , team ) local spawnX , spawnY , spawnZ = unpack ( teamsTable [ teamName ] ) spawnPlayer ( source , spawnX , spawnY , spawnZ ) end ) I want to spawn with a specified skin .. I added the skin after the coordinates but it doesn't work [ "Police" ] = { 1577 , -1694 , 6, 280 } ,
  3. A3kri

    [Help] gui close

    Ook, sorry my fault --[[Panel created by: [FOTL]Danny]]-- --[[On 17th August 2011]]-- x,y = guiGetScreenSize() JobsWin = guiCreateWindow(x/3 - 170,y/3 - 20,200,320,"لوحة إختيار الفريق",false) teamsList = guiCreateGridList(0,22,186,255,false,JobsWin) column = guiGridListAddColumn( teamsList, "Teams", 0.85 ) for id, team in ipairs(getElementsByType("team")) do local row = guiGridListAddRow ( teamsList ) guiGridListSetItemText ( teamsList, row, 1, getTeamName ( team ), false, false ) guiGridListSetItemColor ( teamsList, row, 1, getTeamColor ( team ) ) end guiWindowSetMovable ( teamsList, false ) guiWindowSetMovable ( JobsWin, false ) guiWindowSetSizable ( teamsList, false ) guiWindowSetSizable ( JobsWin, false ) send = guiCreateButton(0,285,90,25,"Select",false,JobsWin) guiSetVisible(JobsWin, true) showCursor(true) setTimer ( showingTeams, 1000, 1) addEventHandler ( "onClientGUIClick", root, function ( button ) if button == "left" then if source == send then local row, col = guiGridListGetSelectedItem ( teamsList ) local teamName = guiGridListGetItemText ( teamsList, row, col ) triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(), teamName ) end end end) addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), close)
  4. hello, I'm using a team selection + loginpanel that I found in the community and I managed to remove the login panel cuz I need the team selection only in the team selection there is select and close I removed the close button I want when the player clicks on select it puts him on the team ( which it does ) then close the gui of the team selection this is the select button code addEventHandler ( "onClientGUIClick", root, function ( button ) if button == "left" then if source == send then local row, col = guiGridListGetSelectedItem ( teamsList ) local teamName = guiGridListGetItemText ( teamsList, row, col ) triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(), teamName ) end end end)
  5. مو مود ريس .. مود عادي .. اذا امششي السيارة في بعض الطرق مره وحده تطيح تحت الأرض عقب شوي تجوف روحك فالأرض ونازل عن السيارة
  6. السلام عليكم عندي فالسيرفر بعض الطرق لين أمشي عليهم بالسيارة أو مشي يطح ويصير فمكان مادري وين او ساعات فالبحر والمشكلة الثانية ابي اخلي الـ guest يبدأ فمكان معين أي ملف اعدل ؟ وأبي تبدأ معاه سكن معينه شلون ولين مات بعد يرجع لنفس المكان شولن ؟
  7. I've added removeworldobject and now it's better its just my custom object over the original las airport how do i remove the original las airport ? and any solutions for my other problems, especially the roads
  8. @Hunterix: first thanks for your reply and the first code just removed my custom object and spawned one underground and your second did change anything but made it the same so now I'm using your second code waiting for more solution anyways thanks
  9. [HELP] custom object, and roads Hello, I'm new to this community and MTA .. I've searched for my problem in the forum but with no good results 1. Apparently my server roads sometime glitches or whatever do you call it, it drops the players into the sea. or when he is on a car the car drowns and he stays on the ground and sometimes he just leave the car. 2. My other problem is, i made a custom object but now it's duplicated its one over another. and when i remove the object creation from the .map, the custom object disappears. this is my object creation code in the .map "object (lasairprt5) (1)" doublesided="false" model="4828" interior="0" dimension="0" posX="1481" posY="-2300.1999511719" posZ="12.5" rotX="0" rotY="0" rotZ="0"> this is my custom.lua addEventHandler('onClientResourceStart', resourceRoot, function() outputChatBox ( "Dawar Al-Lulu is started") local txd = engineLoadTXD('files/lasairprt5.txd',true) engineImportTXD(txd, 4828) local dff = engineLoadDFF('files/lasairprt5.dff', 0) engineReplaceModel(dff, 4828) local col = engineLoadCOL('files/lasairprt5.col') engineReplaceCOL(col, 4828) engineSetModelLODDistance(4828, 500) end ) and this is my meta.xml 3. My third problem is, in play gamemode I've set the spawn place and it's working but the spawn skin isn't working it just spawns the default cj's one "0"
×
×
  • Create New...