Jump to content

LasHa

Members
  • Posts

    96
  • Joined

  • Last visited

Everything posted by LasHa

  1. Okay thank you much with every single help <3 can i add you in skype? i have few more questions and please delete all of your comments to prevent scamers from st ealing this simple script
  2. Thanks it works. and the last the last Question can you add in function StuntComplete that the Marker which i will enter it will become green? please :*
  3. okay and how to change single blip color? like if i enter in the marker with this code local blips = getElementsByType ( "blip" ) for blipKey, blipValue in ipairs ( blips ) do local red, green, blue, alpha = getBlipColor ( blipValue ) if ( red ~= 0 or green ~= 255 or blue ~= 0 or alpha ~= 255 ) then setBlipColor ( blipValue, 0, 255, 0, 255 ) end end every blip color changes to green. http://i.imgur.com/bpfJf1r.jpg http://i.imgur.com/WkiAQ5m.jpg my code local TimeTable = {} local waitTime = 3000 -- 3 seconds local Markers = { {522, -1204, -1057, 155, 5000}, -- Marker 1 {522, -1204, -1090, 155, 5000}, -- Marker 2 {522, -1204, -1150, 155, 5000}, -- Marker 3 {522, -1204, -1200, 155, 5000}, -- Marker 4 {522, -1204, -1250, 155, 5000}, -- Marker 5 } for i , v in pairs (Markers) do HitMarker = createMarker ( v[2], v[3], v[4], "corona", 1.20, 255, 0, 0, 255 ) createBlipAttachedTo( HitMarker, 0 ) setElementData ( HitMarker, "model", v[1] ) setElementData ( HitMarker, "cash", v[5] ) end function allowedVehicles( hitElement, matchingDimension ) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then if isPedInVehicle ( hitElement ) then local vehicle = getPedOccupiedVehicle ( hitElement ) if vehicle then if getElementModel ( vehicle ) == getElementData ( source, "model" ) then TimeTable[hitElement] = setTimer(StuntComplete, waitTime, 1, hitElement,source) setElementData ( hitElement, "entered.marker", true ) else outputChatBox ( "You have entered in Stunt with wrong vehicle", hitElement, 255, 0, 0 ) end end end end end addEventHandler( "onMarkerHit", resourceRoot, allowedVehicles ) function StuntComplete ( player,marker) if isElement ( player ) then if getElementData ( player, "entered.marker" ) then givePlayerMoney ( player, tonumber(getElementData (marker, "cash"))) outputChatBox ( "You have completed the Stunt", hitElement, 0, 255, 0 ) local blips = getElementsByType ( "blip" ) for blipKey, blipValue in ipairs ( blips ) do local red, green, blue, alpha = getBlipColor ( blipValue ) if ( red ~= 0 or green ~= 255 or blue ~= 0 or alpha ~= 255 ) then setBlipColor ( blipValue, 0, 255, 0, 255 ) end end end end end addEventHandler ( "onMarkerLeave", resourceRoot, function ( leaveElement ) if ( isElement ( leaveElement ) and getElementType ( leaveElement ) == "player" ) then if isTimer ( waitTime ) then killTimer ( waitTime ) setElementData ( leaveElement, "entered.marker", false ) outputChatBox("You failed the Stunt!", player, 255, 0, 0) end end end )
  4. nothing bad with English just a bad explanation. okay i will show you with pictures look createBlipAttachedTo ( HitMarker, 0 ) i want this marker to be small square always but http://i.imgur.com/ZeoqWJn.jpg http://i.imgur.com/tSWnctZ.jpg http://i.imgur.com/63Na05o.jpg look how this small red blip changes itself how to freeze it as square?
  5. Walid one more question. i want to use red small square as Blip its a 0(Marker) but when its higher then player its triangle with corner up and when its lower then player corner down how to freeze its with just small red square?
  6. Thannks works really good. :*
  7. LasHa

    HELP Table

    Hello guys! Today i wanna learn something like table but couldn't understand how todo it. I want table like this [Vehicle, x, y, z, MoneyAmount] or like this(better this one so i could make many markers for one model) VehicleModel(for example 411) = [x, y, z, MoneyAmount] VehicleModel means car which will be allowed to hit marker. x, y, z are for Markers and amount of money means that after marker hit he gets Money for example 5,000$ if its possible to be done help me please.
  8. LasHa

    HELP 2nd Enter

    Hello guys! i have a simple question. I'm begginer scripter so i need help with Marker. I made script and when Infernus hit marker and stay for 3 sec the driver gets 5k and marker color changes to green but how to prevent people from getting money or changing marker color on the second enter.
  9. LasHa

    Help Markers

    can i add you in skype? i can explain much better.
  10. LasHa

    Help Markers

    Thank you guys very much. guys can i prevent people from entering in the marker the second time? to prevent them getting money.
  11. LasHa

    Help Markers

    The same thing problem with Event handler argument 3 http://i.imgur.com/cj6I5Gt.jpg addEventHandler("onMarkerHit", infernusMarker, AllowedVehicles)
  12. LasHa

    Help Markers

    dude it didn't give me money http://i.imgur.com/We8PD3e.jpg
  13. LasHa

    Help Markers

    now i don't get anymore Error about this EventHandler i fixed it but i don't get money
  14. LasHa

    Help Markers

    local infMarkers = { {2011.6, 1543.4, 10.5}, -- Marker 1 {x,y,z} -- Marker 2 } for i , v in pairs (infMarkers) do local infernusMarker = createMarker ( v[1], v[2], v[3], "cylinder", 4, 255, 255, 0, 170 ) end function allowedVehicles( hitElement, matchingDimension ) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then if isPedInVehicle ( hitElement ) then local vehicle = getPedOccupiedVehicle ( hitElement ) if vehicle then local model = getElementModel(vehicle) if tonumber(model) == 411 then robTbl[hitElement] = setTimer(GMinfernus, waitTime, 1, hitElement) end end end end addEventHandler( "onMarkerHit", infernusMarker, allowedVehicles ) local TimeTable = {} local waitTime = 3000 -- 3 seconds function GMinfernus (player) if isElement (player) then if isElementWithinMarker ( player, infernusMarker) then return end givePlayerMoney(player, 5000) end end end and there is one problem about v[3] too in createElement
  15. LasHa

    Help Markers

    Walid i'm not earning money while standing in Marker and i got this error in debugscript 3 WARNING: Script\script-c.lua:18: Bad argument @ 'addEventHandler' [Expected element at argument 2, got boolean] and this EventHandler - local infernusMarker = createMarker ( v[1], v[2], v[3], "cylinder", 4, 255, 255, 0, 170 ) addEventHandler( "onMarkerHit", infernusMarker, infernusHit )
  16. LasHa

    Help Markers

    the last question can i add the second function to NRG? how to analyse if player hitted nrg markers with nrg and infernus markers with
  17. LasHa

    Help Markers

    Thank you walid much and the last thing i want can i get that if player will stay for 3 sec in the marker he gets for example money and write account data that he have hitted and if he leaves in this 3 sec nothing happens. and also can i add the second function to NRG? how to analyse if player hitted nrg markers with nrg and infernus markers with infernus?
  18. LasHa

    Help Markers

    really? are you kidding me? even wiki has better information than you i asked for another thing i need to create many markers i want to create list like this markers = {ls marker, sf marker, lv marker} and also for that markers i want that only by infernus can be hitted and on hit write account data
  19. LasHa

    Help Markers

    Hello guys! Today i've decided to create very nice script the problem is i am begginer. so in what i need help. i want to create markers list with definations of car. i mean create some markers for only infernus hit and some for nrg. after hit if player stays inside for 2 sec i want to store in account data that the player hitted the marker. Each of help by you would be useful for me and infuture works it will be uswful too
  20. LasHa

    [HELP]Vip Panel

    Thank you very much it works fine. i just have small problem. I want to connect setElementData to setTimer. like that if player buys 2000 hours of VIP, 2000 hours timer will start. and can i get remaining time and to add ElementData to that remaining time?
  21. Solved Buttons problem now please read last reply
  22. guys look this script. participateWindow = guiCreateWindow(436, 368, 448, 220, "CSF DD Event", false) guiWindowSetSizable(participateWindow, false) participateButton = guiCreateButton(76, 150, 128, 43, "Participate", false, participateWindow) guiSetFont(participateButton, "default-bold-small") participateLabel = guiCreateLabel(10, 21, 432, 127, "Hello "..getPlayerName(localPlayer)..", you are about to participate in dd event, \n where you can kill people by car, with shooting them rockets from car. Click \n button Participate, but it costs 5,000$. \n If you don't want to participate, or lose 5,000$ click Cansel Button. \n But also you must know that, if you win this event you will get \n 50,000$.", false, participateWindow) guiSetFont(participateLabel, "clear-normal") cancelButton = guiCreateButton(233, 150, 128, 43, "Cancel", false, participateWindow) guiSetFont(cancelButton, "default-bold-small") local participate = false addEventHandler('onClientGUIClick', root, function () if ( source == participateButton ) then guiSetVisible(participateWindow, false) showCursor(false) local count = (getElementData(localPlayer,"Your_Data")) or 0 setElementData(localPlayer,"Your_Data", count + 1) triggerServerEvent('TakeMoney', localPlayer) participate = true setTimer(toggleButton, 250, 1) exports.CSUtexts:output("You have been participated in event, wait for other players, to participate \n and when you reach 10 players, event will be started automaticaly.", 255, 255, 0) elseif ( source == cancelButton ) then guiSetVisible(participateWindow, false) showCursor(false) local count = 1 if ( getElementData(localPlayer, "Your_Data") ) == count then setElementData(localPlayer, "Your_Data", participateButton, count + 1) exports.CSUtexts:output("You Already Signed In Be Patient Till Event Starts",255,255,0) end end end ) function toggleButton() if (participate == true) then guiSetProperty( participateButton, "Disabled", "True" ) end end function hitTime () if ( source == participateButton ) then setElementData (source , "onClientGUIClick" , getTickCount) end end addEventHandler("onClientGUIClick" , getRootElement(), hitTime) function hit () local timeHit = (getTickCount() - getElementData ( thePlayer, "hitTime")) / 1000 exports.CSUtexts:output("Event Doesn't Started Yet"..getPlayerName(localPlayer).."Already Signed In /n Be Patient Till event starts" ,255,255,0) end addEventHandler('onClientResourceStart', resourceRoot, function () guiSetVisible(participateWindow, false) showCursor(false) end ) function onQuitGame( ) local count = getElementData(localPlayer,"Your_Data") setElementData(localPlayer,"Your_Data",count -1) exports.CSUtexts:output(""..getPlayerName(localPlayer).." left the event, Paricipated players in event "..count.."", 255, 255, 0) end addEventHandler( "onClientPlayerQuit", getRootElement(), onQuitGame ) addCommandHandler("leavedd", onQuitGame) function checkPlayers() local playersInDD = getElementData(localPlayer,"Your_Data") exports.CSUtexts:output("There are "..playersInDD.."/10 players signed in event", 255, 255, 0) end addCommandHandler("ddevent", checkPlayers) function warpPlayers() if ( getElementData ( localPlayer,"Your_Data" ) ) == 10 then exports.CSUtexts:output("10/10 players have signed in event, wait 10 seconds, to be warped.", 255, 255, 0) setTimer(1000, 1) setElementDimension(5) end end addEvent("ShowGUI", true) addEventHandler("ShowGUI", root, function() guiSetVisible(participateWindow, true) showCursor(true) end ) in this function function warpPlayers() if ( getElementData ( localPlayer,"Your_Data" ) ) == 10 then exports.CSUtexts:output("10/10 players have signed in event, wait 10 seconds, to be warped.", 255, 255, 0) setTimer(1000, 1) setElementDimension(5) end end i want this argument to work if ( getElementData ( localPlayer,"Your_Data" ) ) == 10 then in this script you see that player participate in event by clicking button and how to get 10 players button clicked? and i made it with elementdatas :S but i got just a problem. i used this argument but it doesn't work help me? Problem: i want to get 10 players participated in event and how?
  23. LasHa

    HELP

    ouch doesn't works solidsnake14 can i add you in skype and show you whole scirpt and help me pleasE?
×
×
  • Create New...