Jump to content

[HELP]Fix Marker Script


Om.

Recommended Posts

Posted

if you mean getting marker in the ground just when you take the x,y,z do -1 to z

#include <iostream>

int main() {

    std::cout << "C++ is amazing <3" << std::endl;

    return 0;

}

I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please

Posted
if you mean getting marker in the ground just when you take the x,y,z do -1 to z

Ya But If we gone into that marker our vehical get automatically fixed with 200$ cost...

Looking for a developer? Feel free to PM me :)

Posted

this ?

newmarker1 = createMarker ( 0, 0, 5, "checkpoint", 9.9, 0, 255, 0, 255 )  -- Create a green marker 
  
function markerfix(hitElement) 
    if ( source == newmarker1 ) then 
        if ( isElement ( hitElement ) and getElementType ( hitElement ) == "player" ) then 
          local ve = getPedOccupiedVehicle(hitElement) 
          fixVehicle(ve) 
          takePlayerMoney ( hitElement, 200 )  
        end 
     end 
end 
addEventHandler("onMarkerHit", getResourceRootElement(getThisResource()), markerfix) 

........... \__ ▄▂_

.........[█|||███████]▄▄▄▄▄▄▄▄▄▃▂

..__▂▄▅█████████▅▄▃▂

I███████████████████]

...◥⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙◤

░░░███████ ]▄▄▄▄▄▄▄▄

▂▄▅████████▅▄▃▂

I███████████████████]

◥⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙◤

Posted
this ?
newmarker1 = createMarker ( 0, 0, 5, "checkpoint", 9.9, 0, 255, 0, 255 )  -- Create a green marker 
  
function markerfix(hitElement) 
    if ( source == newmarker1 ) then 
        if ( isElement ( hitElement ) and getElementType ( hitElement ) == "player" ) then 
          local ve = getPedOccupiedVehicle(hitElement) 
          fixVehicle(ve) 
          takePlayerMoney ( hitElement, 200 )  
        end 
     end 
end 
addEventHandler("onMarkerHit", getResourceRootElement(getThisResource()), markerfix) 

Let Me Cheak This :D But i need a Meta.xml of this Script pls gimme

Looking for a developer? Feel free to PM me :)

Posted

#include <iostream>

int main() {

    std::cout << "C++ is amazing <3" << std::endl;

    return 0;

}

I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please

Posted

That's a server side script, so the type must be "server" not "client".

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Darhal, don't help people if you can't even give a proper meta.xml to the poor user.

<meta> 
 <script src="server.lua" type="server" /> 
</meta> 

If I helped you, please click the like button on the right ;) Thanks!

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