amm2100

Members
  • Content Count

    41
  • Joined

  • Last visited

Community Reputation

0 Neutral

About amm2100

  • Rank
    Rat

Details

  • Gang
    SAUR
  1. if this ^ didn't work .. try this client side: local myMarker = createMarker( 1543.4465332031, -1724.4774169922, 12.546875 , "cylinder", 2.0, 250, 250, 250, 200, getRootElement() ) function MarkerHit ( hitPlayer, matchingDimension ) if (hitPlayer == localPlayer) then outputChatBox ( getPlayerName(hitPlayer) .. " Entered a Died Marker" ) end end function createSpawnWindow(hitPlayer) if (hitPlayer == localPlayer) then windowSpawncar = guiCreateWindow(0.36, 0.70, 0.26, 0.29, "", true) guiWindowSetSizable(windowSpawncar, false) btnSancheZ = guiCreateButton(0.05, 0.12, 0.87, 0.14, "1: Sanchez", true, windowSpawncar) local font0_PetitFormalScript = guiCreateFont(":spawnscar/fonts/PetitFormalScript.ttf", 10) guiSetFont(btnSancheZ, font0_PetitFormalScript) guiSetProperty(btnSancheZ, "NormalTextColour", "FFFFFFFF") btnVoodoo = guiCreateButton(0.05, 0.39, 0.87, 0.14, "2: Voodoo", true, windowSpawncar) guiSetFont(btnVoodoo, font0_PetitFormalScript) guiSetProperty(btnVoodoo, "NormalTextColour", "FFFFFFFF") btnCaddy = guiCreateButton(0.06, 0.67, 0.86, 0.14, "3: Caddy", true, windowSpawncar) guiSetFont(btnCaddy, font0_PetitFormalScript) guiSetProperty(btnCaddy, "NormalTextColour", "FFFFFFFF") guiSetVisible( windowSpawncar, true ) addEventHandler( "onClientGUIClick",resourceRoot, function () if ( source == btnSancheZ ) then triggerServerEvent("createSANCHEZ",localPlayer) end end) end end function markerLeave( localPlayer ) guiSetVisible( windowSpawncar, false) end addEventHandler ( "onClientMarkerHit",myMarker, MarkerHit ) addEventHandler( "onClientMarkerHit",myMarker, createSpawnWindow) addEventHandler ( "onClientMarkerLeave",myMarker,markerLeave) server side: local vechical = {} function spawncar() if isElement(vechical[source]) then destroyElement(vechical[source]) end local x,y,z = getElementPosition(source) vechical[source] = createVehicle(468,x, y,z) warpPedIntoVehicle (source,vechical[source]) end addEvent("createSANCHEZ",true) addEventHandler("createSANCHEZ",root,spawncar) Finial it is working But , What is the different ?? , Only on Server Side ?
  2. Not Working I notice the TriggerServerEvent not working but I don't know why ?
  3. Can You explain More ?
  4. I tried to put an command for Admin only named Duty <right name="command.duty" access="true"></right> and I put it false to all (Default) <right name="command.duty" access="false"></right> but when I try to type the Command and test it no thing happen and I am sure the I am Admin , Notice there is not error on Console , duty command should set My team to Staff team
  5. local myMarker = createMarker( 1543.4465332031, -1724.4774169922, 12.546875 , "cylinder", 2.0, 250, 250, 250, 200, getRootElement() ) function MarkerHit ( hitPlayer, matchingDimension ) if (hitPlayer == localPlayer) then outputChatBox ( getPlayerName(hitPlayer) .. " Entered a Died Marker" ) end end function createSpawnWindow(hitPlayer) if (hitPlayer == localPlayer) then windowSpawncar = guiCreateWindow(0.36, 0.70, 0.26, 0.29, "", true) guiWindowSetSizable(windowSpawncar, false) btnSancheZ = guiCreateButton(0.05, 0.12, 0.87, 0.14, "1: Sanchez", true, windowSpawncar) local font0_PetitFormalScript = guiCreateFont(":spawnscar/fonts/PetitFormalScript.ttf", 10) guiSetFont(btnSancheZ, font0_PetitFormalScript) guiSetProperty(btnSancheZ, "NormalTextColour", "FFFFFFFF") btnVoodoo = guiCreateButton(0.05, 0.39, 0.87, 0.14, "2: Voodoo", true, windowSpawncar) guiSetFont(btnVoodoo, font0_PetitFormalScript) guiSetProperty(btnVoodoo, "NormalTextColour", "FFFFFFFF") btnCaddy = guiCreateButton(0.06, 0.67, 0.86, 0.14, "3: Caddy", true, windowSpawncar) guiSetFont(btnCaddy, font0_PetitFormalScript) guiSetProperty(btnCaddy, "NormalTextColour", "FFFFFFFF") guiSetVisible( windowSpawncar, true ) addEventHandler( "onClientGUIClick", btnSancheZ, function ( ) if ( source == btnSancheZ ) then triggerServerEvent("createSANCHEZ", getRootElement()) end end, false ) end end function markerLeave( localPlayer ) guiSetVisible( windowSpawncar, false) end addEventHandler ( "onClientMarkerHit", myMarker, MarkerHit ) addEventHandler( "onClientMarkerHit", myMarker, createSpawnWindow) addEventHandler ( "onClientMarkerLeave", getRootElement(), markerLeave ) I change some of the Client Side But it still Doesn't Work the Button doesn't do anything
  6. Waring spawnscar\client\client.lua:26: Bad usage @ 'addEventHandler' ['onClientGUIClick' with this function is already handled]
  7. Can You Show me How to Put the Event on The Fuction ??
  8. amm2100

    [Help] (Done)

    Thank You very Much GTX
  9. I made an Small Script when the Player press btnSanchz , Sanchez will Spawn and He will warp on it Client Side Server Side but when I press BtnSanchez it doesn't work no thing happen and there is no Error on the Console
  10. amm2100

    [Help] (Done)

    local vechical = {} function spawncar( thePlayer ) if isElement(vechical[thePlayer]) then destroyElement( vechical[thePlayer] ) end local x,y,z = getElementPosition( thePlayer ) local vechical[thePlayer] = createVehicle( 468, x, y, z ) warpPedIntoVehicle ( thePlayer, vechical[thePlayer] ) end addCommandHandler( "create", spawncar) [01:16:42] SCRIPT ERROR: myserver\script.lua:85: unexpected symbol near '[' [01:16:42] ERROR: Loading script failed: myserver\script.lua:85: unexpected symbol near '['
  11. I make a Team Named Staff Team and I need to put SuperMan to that team only How can I do that ???