Jump to content

payNspray


Lloyd Logan

Recommended Posts

Hey, so i created a paynspray script but when the Element leaves the Marker, it continues to repair the car? Nothing in db 3, it doesn't cancel the script? Thanks

Server

dutymarker = createMarker(1911.35938, -1777.46899, 11.98387, "cylinder", 4.0, 255, 255, 155) 
  
function paynspray(hitElement,matchingDimension) 
    if (hitElement and getElementType(hitElement) == "player" and matchingDimension) then 
    local money = getPlayerMoney(hitElement) 
        if ( money>=500 ) then 
            outputChatBox("Please wait whilst we work on your vehicle!", hitElement) 
            setTimer (fixVehicle,  5000, 1, getPedOccupiedVehicle(hitElement)) 
            setTimer ( outputChatBox, 5000, 1, "Thank you for for coming to us for your repair!" ) 
        else 
            outputChatBox("Please come back when you have atleast $500, thank you", hitElement) 
        end 
    end 
end 
addEventHandler("onMarkerHit", dutymarker, paynspray) 

Client

function markerLeave( leaveElement, matchingDimension ) 
            cancelEvent("onMarkerHit", leaveElement, paynspray) 
            outputChatBox("Wait! What about your repair?", hitElement) 
end 
addEventHandler( "onMarkerLeave", leaveElement, markerLeave ) 

Link to comment

You say this is the client side :

function markerLeave( leaveElement, matchingDimension ) 
            cancelEvent("onMarkerHit", leaveElement, paynspray) 
            outputChatBox("Wait! What about your repair?", hitElement) 
end 
addEventHandler( "onMarkerLeave", leaveElement, markerLeave ) 

yes?

onMarkerLeave it,s ServerSide Only! Thats What i mean and i give you the clientSide Event

Link to comment
You say this is the client side :
function markerLeave( leaveElement, matchingDimension ) 
            cancelEvent("onMarkerHit", leaveElement, paynspray) 
            outputChatBox("Wait! What about your repair?", hitElement) 
end 
addEventHandler( "onMarkerLeave", leaveElement, markerLeave ) 

yes?

onMarkerLeave it,s ServerSide Only! Thats What i mean and i give you the clientSide Event

Thank you!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...