Jump to content

killeryoyo

Members
  • Posts

    137
  • Joined

  • Last visited

Everything posted by killeryoyo

  1. I fixed the End Mix, but there is another Problem. when i type the command. The Spike doesnt remove. Can anyone help?
  2. Hello Guys, I was trying to make a spike strip system and i failed in the end Things. It was working well then when i added another Command Handler, It gave me errors about the end things and mixed up everything. So i need help in it. addCommandHandler("sting", function(player) if (player) then local x, y, z = getElementPosition(player) local spike = createObject(2892,x+2,y+2,z-0.9) local x2, y2, z2 = getElementPosition(spike) local blow = createColSphere(x2, y2, z2, 3) local AnimationDuration = 1000 -- Measure your animation's duration in miliseconds setPedAnimation( player, "PED", "IDLE_CHAT", 1, false, true, true, true, false ) setTimer(setPedAnimation,AnimationDuration,1,source) addEventHandler("onColShapeHit",blow,function (player) if player and getElementType(player) == "player" then if isPedInVehicle(player) then local pveh = getPedOccupiedVehicle(player) setVehicleWheelStates(pveh,1,1,1,1) addEventHandler("onColShapeHit") destroyElement ( spike ) destroyElement ( source ) end end end end) addCommandHandler("tale", function(takeoff) if (player) then destroyElement ( spike ) destroyElement ( source ) end end) Any Help will be Appreciated thank you .
  3. my idea for this resource is to change it from Marker to Icon it would be more better .
  4. didnt work please anyone could help? i will post the server side.
  5. dont worry im not stealer . im new guy in scripting and i can show u photos about the gui. not copied .
  6. Hello guys, when i was scripting a spawn menu for my new Server. I had a problem in it. Everytime i login it doesn't show, but when i die it shows. When i tried to change the coding. it shows when i login but after i spawn the Spawn menu doesn't go idk what is the problem with it. Can you help me please? Here is the coding in the client. function drawSpawnScreen() spawnWindow = guiCreateWindow(350,150,800,528, "Spawn Screen", false) ----- Old pos 239,198,376,478 ---- infoMemo = guiCreateMemo(198,357,355,160,"",false, spawnWindow) guiMemoSetReadOnly(infoMemo, true) cityGridList = guiCreateGridList(60,40,171,269, false, spawnWindow) guiGridListSetSelectionMode(cityGridList, 2) guiGridListAddColumn(cityGridList, "City", 0.82) classGridList = guiCreateGridList(250,40,171,269, false, spawnWindow) guiGridListSetSelectionMode(classGridList, 2) guiGridListAddColumn(classGridList, "Class", 0.82) skinGridList = guiCreateGridList(450,40,171,269, false, spawnWindow) guiGridListSetSelectionMode(skinGridList, 2) guiGridListAddColumn(skinGridList, "Skin", 0.82) guiWindowSetMovable(spawnWindow, true) guiWindowSetSizable(spawnWindow, false) spawnScreenOKButton = guiCreateButton(624,321,210,36, "Spawn", false, spawnWindow) Image = guiCreateStaticImage(60,390,128,63,"logo.png",false,spawnWindow) guiSetProperty(spawnScreenOKButton, "Disabled", "True") for n, v in pairs(cities) do local row = guiGridListAddRow(cityGridList) guiGridListSetItemText(cityGridList, row, 1, n, false, false) end setTimer (drawSpawnScreen, 2500) guiSetVisible(spawnWindow, false) addEventHandler("onClientGUIClick", cityGridList, onCityClick) addEventHandler("onClientGUIClick", classGridList, onClassClick) addEventHandler("onClientGUIClick", skinGridList, onSkinClick) addEventHandler("onClientGUIClick", spawnScreenOKButton, onSpawnButtonClick) fadeCamera(true) guiSetVisible(spawnWindow, true) guiGridListSetSelectedItem(skinGridList, -1, 0) showCursor(true) showPlayerHudComponent ("all",false) end function onCityClick(button) if source == cityGridList and button == "left" then if guiGridListGetSelectedCount(cityGridList) > 0 then guiGridListClear(classGridList) local selectedRow, selectedCol = guiGridListGetSelectedItem( cityGridList ); -- get double clicked item in the gridlist local cityName = guiGridListGetItemText( cityGridList, selectedRow, selectedCol ) -- get its text local cityClasses = cities[cityName] for x, y in pairs(cityClasses) do local row = guiGridListAddRow(classGridList) guiGridListSetItemText(classGridList, row, 1, x, false, false) end guiSetProperty(spawnScreenOKButton, "Disabled", "True") end end end function onClassClick(button) if source == classGridList and button == "left" then if guiGridListGetSelectedCount(cityGridList) > 0 and guiGridListGetSelectedCount(classGridList) > 0 then guiGridListClear(skinGridList) local selectedRow, selectedCol = guiGridListGetSelectedItem( cityGridList ); -- get double clicked item in the gridlist local cityName = guiGridListGetItemText( cityGridList, selectedRow, selectedCol ) -- get its text local selectedRow, selectedCol = guiGridListGetSelectedItem( classGridList ); -- get double clicked item in the gridlist local className = guiGridListGetItemText( classGridList, selectedRow, selectedCol ) -- get its text local classSkins = cities[cityName][className] for x, y in pairs(classSkins) do local row = guiGridListAddRow(skinGridList) guiGridListSetItemText(skinGridList, row, 1, x, false, false) end guiSetProperty(spawnScreenOKButton, "Disabled", "True") end end end function onSkinClick(button) if source == skinGridList and button == "left" then if guiGridListGetSelectedCount(cityGridList) > 0 and guiGridListGetSelectedCount(classGridList) > 0 and guiGridListGetSelectedCount( skinGridList ) > 0 then local selectedRow, selectedCol = guiGridListGetSelectedItem( cityGridList ); -- get double clicked item in the gridlist local cityName = guiGridListGetItemText( cityGridList, selectedRow, selectedCol ) -- get its text local selectedRow, selectedCol = guiGridListGetSelectedItem( classGridList ); -- get double clicked item in the gridlist local className = guiGridListGetItemText( classGridList, selectedRow, selectedCol ) -- get its text local selectedRow, selectedCol = guiGridListGetSelectedItem( skinGridList ); -- get double clicked item in the gridlist local skinName = guiGridListGetItemText( skinGridList, selectedRow, selectedCol ) -- get its text guiSetProperty(spawnScreenOKButton, "Disabled", "False") guiSetText(infoMemo, cities[cityName][className][skinName]["information"]) end end end function onSpawnButtonClick(button) if source == spawnScreenOKButton and button == "left" then if guiGridListGetSelectedCount( cityGridList ) > 0 and guiGridListGetSelectedCount( classGridList ) > 0 and guiGridListGetSelectedCount( skinGridList ) > 0 then local selectedRow, selectedCol = guiGridListGetSelectedItem( cityGridList ); -- get double clicked item in the gridlist local cityName = guiGridListGetItemText( cityGridList, selectedRow, selectedCol ) -- get its text local selectedRow, selectedCol = guiGridListGetSelectedItem( classGridList ); -- get double clicked item in the gridlist local className = guiGridListGetItemText( classGridList, selectedRow, selectedCol ) -- get its text local selectedRow, selectedCol = guiGridListGetSelectedItem( skinGridList ); -- get double clicked item in the gridlist local skinName = guiGridListGetItemText( skinGridList, selectedRow, selectedCol ) -- get its text local spawninfo = cities[cityName][className][skinName] setElementData ( client, "Class", skinName ) triggerServerEvent("onPlayerSpawnButton", getLocalPlayer(), spawninfo["spawnX"] , spawninfo["spawnY"], spawninfo["spawnZ"], className, spawninfo['permission'], spawninfo['skin'],spawninfo['weapons'], getLocalPlayer(), skinName) else displayError("Please make a selection!") end end end function hideSpawnScreen() if spawnWindow then guiSetVisible(spawnWindow, false) showCursor(false) if errorWindow then guiSetVisible(errorWindow, false) end guiSetText(infoMemo, "") currentSpawn = false currentWeapons = false currentColors = {} currentLocation = {} end showPlayerHudComponent ("all",true) end addEvent("onSpawnSuccessful", true) addEventHandler("onSpawnSuccessful", getRootElement(), hideSpawnScreen()()) function createMessageBox() errorWindow = guiCreateWindow(resX / 2 - 150, resY / 2 - 100, 300, 200, "OPS ERROR!!", false) errorLabel = guiCreateMemo(5, 25, 295, 125, "", false, errorWindow) guiMemoSetReadOnly(errorLabel, true) errorWindowButton = guiCreateButton(110, 160, 80, 25, "OK", false, errorWindow) guiWindowSetMovable(errorWindow, false) guiWindowSetSizable(errorWindow, false) guiSetVisible(errorWindow, false) addEventHandler("onClientGUIClick", errorWindowButton, function() guiSetVisible(errorWindow, false) guiSetProperty(errorWindow, "AlwaysOnTop", "False") end, false) end function displayError(error) if not errorWindow then createMessageBox() end guiSetText(errorLabel, error) guiSetProperty(errorWindow, "AlwaysOnTop", "True") guiSetVisible(errorWindow, true) end addEvent("onSpawnError", true) addEventHandler("onSpawnError", getRootElement(), displayError) addCommandHandler( "spawnerror",displayError) function checkPlayerAlive() triggerServerEvent("wasPlayerAliveEvent", getLocalPlayer()) end addEvent("onPlayerLogin", true) addEventHandler("onPlayerLogin", getRootElement(), drawSpawnScreen()) addEventHandler("onClientPlayerLogin", getLocalPlayer(), drawSpawnScreen()) addEventHandler("onClientPlayerWasted", getLocalPlayer(), drawSpawnScreen) addEvent("onPlayerWasntAlive", true) addEventHandler("onPlayerWasntAlive", getRootElement(), drawSpawnScreen) function stopMinigunDamage ( attacker, weapon, bodypart ) if ( getTeamName(getPlayerTeam(source)) == "Admin" ) then if ( getTeamName(getPlayerTeam(attacker)) ~= "Admin" ) then cancelEvent() end end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopMinigunDamage ) i will really appreciate the help thank you ^^.
  7. Four Must Die DM Race Hello MTA Members, I present to you a new made DM Race server called FMD DM Race. I decided to make it because i dreamed to make a good one and as i see i made a good one. FMD got many features in the server. I worked so hard to present the best for the members and i will present to you some Screens about the Server. Our Forums is fourmustdie.boards.net. The owner is Cream Vice Owner: Splash Sub Owner: GiorgosGRN Full admins: Dominik, and Tron. Login Panel Race Userpanel We also have a special view of the winners of the races. http://imgur.com/Lcc08PF This is the scoreboard of our server. http://imgur.com/vkrQQoz We also have Clan wars and special Events Every week, but if there is players. So come now to FMD DM racing and lets have fun Racing each other and challenging each other. Call you friends and your near by neighbors in the Server! Server IP: mtasa://84.200.74.89:22062 The server isn't completely finished, but you can join anytime you want and enjoy playing!. Don't forget to visit our Forums: fourmustdie.boards.net Thank you all for viewing the Topic. I wish you a happy day. Regards. Four Must Die Owner Cream/killeryoyo
×
×
  • Create New...