Szerző Téma: Nem jó a küldetés amit írtam.  (Megtekintve 551 alkalommal)

Nem jó a küldetés amit írtam.
« Dátum: 2018. Február 05. - 20:28:38 »
0
Sziasztok!
 
Ma írtam egy script-et.
 
Elindítottam....
 
De nem volt jó.
 
A startmarker nem volt ott a helyén és a konzol se
 
írt semmit.
 
 
 
Itt a cucc:
 
Client:
 
 
 
prefix = \"#FFFF00[[ #0000FFBlock#FF0000M#FFFFFFT#00FF00A #FFFFFFKüldetés #FFFF00]]\"
 
addEventHandler( \"onClientResourceStart\", getResourceRootElement( getThisResource( ) ),
    function ()
        startmarker = createMarker( 2498.7819824219, -1684.4909667969, 12.414931297302 [, \"cylinder\", 3, 255, 1, 1, 255 ] )
        startblip = createBlipAttachedTo ( startmarker [, 3, 2, 0, 0, 0, 255, 0, 99999.0] ))
    end
)
 
addEventHandler ( \"onClientMarkerHit\", getRootElement(), startbox )
function startbox ()
    if isElementWithinMarker(thePlayer, startmarker) then
        outputChatBox(\"------------------------------\" [, 10, 10, 230, true] )
        outputChatBox(prefix.. \"A küldetés elkezdéséhez írd be: /m1\" [, 1, 255, 1, true] )
        outputChatBox(\"------------------------------\" [, 10, 10, 230, true] )
    end
end
 
-- VÉGE A KÜLDETÉSNEK
function theend ()
    outputChatBox(\"------------------------------\" [, 10, 10, 230, true] )
    outputChatBox(prefix.. \" Gratulálunk! Sikeresen végigvitted a küldetést!\" [, 1, 255, 1, true] )
    outputChatBox(prefix.. \"Jutalom: 3500 FT\" [, 1, 255, 1, true] )
    outputChatBox(\"------------------------------\" [, 10, 10, 230, true] )
    givePlayerMoney ( 3500 )
end
 
-- KÜLDETÉS
 
addCommandHandler ( \"m1\", go )
function go ( source, CmandName )
    destroyElement(startmarker)
    destroyElement(startblip)
    missioncar = createVehicle ( 602, 2503.6752929688, -1670.8513183594, 13.36344909668 )
    missionman = createPed ( 47, 2503.6752929688, -1670.8513183594, 13.36344909668 [, 0.0 ] )
    setElementPosition ( source, 2503.6752929688, -1670.8513183594, 13.36344909668)
    setElementPosition ( missionman, 2503.6752929688, -1670.8513183594, 13.36344909668)
    odaermarker = createMarker(  [, 1934.7180175781, -1787.1729736328, 12.3828125 \"cylinder\", 3, 255, 1, 1, 255 ] )
 
    -- Beszélgetések
    setTimer ( b-egy, 2000, 1)
    setTimer ( b-ketto, 2000, 1)
    setTimer ( b-harom, 2000, 1)
    setTimer ( b-negy, 2000, 1)
    setTimer ( b-ot, 2000, 1)
    setTimer ( b-hat, 2000, 1)
    setTimer ( b-het, 2500, 1)
end
 
addEventHandler ( \"onClientMarkerHit\", getRootElement(), rablas )
function rablas ()
    if isElementWithinMarker(thePlayer, odaermarker) then
        destroyElement(odaermarker)
        setElementPosition ( missionman, 1920.4338378906, -1776.39453125, 13.578125)
        setTimer(r-b-egy, 750, 1)
        setTimer(elado-kill, 2000, 1)
        rabbolmarker = createMarker(  [, 1917.0793457031, -1775.9217529297, 12.578125 \"cylinder\", 1.5, 255, 1, 1, 255 ] )
    end
end
 
function r-b-egy ()
    outputChatBox(\"Krisztián mondja: Rablás! Fel a kezekkel!\" [, 245, 240, 1, true] )
end
 
function elado-kill ()
    killPed ( elado, [ missionman, 255, 255, false ] )
end
 
addEventHandler ( \"onClientMarkerHit\", getRootElement(), rabol )
function rabol ()
    if isElementWithinMarker(thePlayer, rabolmarker) then
        destroyElement(rabbolmarker)
        server.setPedAnimation(source, \"bomber\", \"BOM_Plant_Loop\")
        setTimer(rabol-vege, 20000, 1)
        setTimer(vege, 3000, 1)
    end
end
 
function rabol-vege ()
    server.setPedAnimation(source, false)
    givePlayerMoney ( 700000 )
end
 
function vege ()
    destroyElement(missioncar)
    destroyElement(missionman)
    startmarker = createMarker( 2498.7819824219, -1684.4909667969, 12.414931297302 [, \"cylinder\", 3, 255, 1, 1, 255 ] )
    startblip = createBlipAttachedTo ( startmarker [, 3, 2, 0, 0, 0, 255, 0, 99999.0] ))
    outputChatBox(\"Gratulálunk! Sikeresen kiraboltad a déli benzinkutat!\" [, 5, 245, 5, true] )
end
 
-- Beszélgetések
function b-egy ()
    outputChatBox(\"Krisztián mondja: Na akkor huzzuk el délihez! Oszt raboljunk!\" [, 245, 240, 1, true] )
end
 
function b-ketto ()
    outputChatBox(getPlayerName(source) \" mondja: Ja! Csak a rohadt rendőrök ne jöjjenek!\" [, 245, 240, 1, true] )
end
 
function b-harom ()
    outputChatBox(\"Krisztián mondja: Nem baj ha jönnek... Sz*rrá lövöm a fejüket!\" [, 245, 240, 1, true] )
end
 
function b-negy ()
    outputChatBox(\"Krisztián mondja: Kicsit gyorsabban!\" [, 245, 240, 1, true] )
end
 
function b-ot ()
    outputChatBox(getPlayerName(source) \" mondja: Ha kussolsz akkor gyorsabb leszek!\" [, 245, 240, 1, true] )
end
 
function b-hat ()
    outputChatBox(\"Krisztián mondja: Mi? Az ad neked erőt?\" [, 245, 240, 1, true] )
end
 
function b-het ()
    outputChatBox(getPlayerName(source) \" mondja: Ja...\" [, 245, 240, 1, true] )
end
 
 
 
Meta.xml:
 
<meta>
    <info author=\"andrasxa\" type=\"script\" name=\"Mission\" description=\"BlockMTA\" version=\"1.0\"/>
    <script src=\"1.lua\" type=\"client\"/>
</meta>

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal