Jump to content

server event help


Recommended Posts

Hello all i want to change the original script which i get copyright to use it to the "you were paid " message hase shown in the chatbox and not in the 3d text in the top :D pls help me thanks

             addEventHandler ( "onClientMarkerHit", flightPath.elements.FlightMarkerExtra, function ( p ) 
            if ( p == localPlayer and isPedInVehicle ( p ) ) then 
                local c = getPedOccupiedVehicle ( p ) 
                if ( getVehicleType ( c ) ~= "Plane" ) then return end 
                if ( getElementData ( c, "NGAntiRestart:VehicleJobRestriction" ) == nil ) then return end 
                if ( getVehicleController ( c ) ~= p ) then return end 
                if ( pilot.VehicleSpeed ( c ) > 10 ) then outputChatBox("Enter the marker at a slower pace.",255,0,0) end 
                pilot.destroyFlightPath ( ) 
                local m = 4500 
                triggerServerEvent ( "NGJobs->GivePlayerMoney", localPlayer, localPlayer, m, "You were paid $"..tostring(m).." for completing the flight path!" ) 
                triggerServerEvent ( "NGJobs->SQL->UpdateColumn", localPlayer, localPlayer, "completeflights", "AddOne" ) 
            end 
        end ) 
    end 
end  
  
  

Link to comment

You can try to change this;

triggerServerEvent ( "NGJobs->GivePlayerMoney", localPlayer, localPlayer, m, "You were paid $"..tostring(m).." for completing the flight path!" ) 

To this;

triggerServerEvent("NGJobs->GivePlayerMoney", localPlayer, localPlayer, m) 
outputChatBox("You were paid $"..tostring(m).." for completing the flight path!", 0, 187, 0) 

This may or may not work - depending on how they set up the server event. At least I think this is what you want to achieve. If the above doesn't work, try this;

triggerServerEvent("NGJobs->GivePlayerMoney", localPlayer, localPlayer, m, "") 
outputChatBox("You were paid $"..tostring(m).." for completing the flight path!", 0, 187, 0) 

Link to comment
Hello all i want to change the original script which i get copyright to use it to the "you were paid " message hase shown in the chatbox and not in the 3d text in the top :D pls help me thanks
             addEventHandler ( "onClientMarkerHit", flightPath.elements.FlightMarkerExtra, function ( p ) 
            if ( p == localPlayer and isPedInVehicle ( p ) ) then 
                local c = getPedOccupiedVehicle ( p ) 
                if ( getVehicleType ( c ) ~= "Plane" ) then return end 
                if ( getElementData ( c, "NGAntiRestart:VehicleJobRestriction" ) == nil ) then return end 
                if ( getVehicleController ( c ) ~= p ) then return end 
                if ( pilot.VehicleSpeed ( c ) > 10 ) then outputChatBox("Enter the marker at a slower pace.",255,0,0) end 
                pilot.destroyFlightPath ( ) 
                local m = 4500 
                triggerServerEvent ( "NGJobs->GivePlayerMoney", localPlayer, localPlayer, m, "You were paid $"..tostring(m).." for completing the flight path!" ) 
                triggerServerEvent ( "NGJobs->SQL->UpdateColumn", localPlayer, localPlayer, "completeflights", "AddOne" ) 
            end 
        end ) 
    end 
end  
  
  

The message is in the serverside function :

triggerServerEvent ( "NGJobs->GivePlayerMoney", localPlayer, localPlayer, m, "You were paid $"..tostring(m).." for completing the flight path!" ) 

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...