[REP+] how to place a yellow downpointing arrow marker on car?
#1

hey guys,
i searched almost whole ****** and samp forums but cant find a simple way to get a marker on a car... like in single player at a safe house the door marker... is there anyway to get that kind of marker on a vehicle?
like AttachMarkerToVehicle? i know this isnt in samp but is ther anything else?

greets niels
Reply
#2

AttachObjectToVehicle
Hook it up .
Reply
#3

maybe you mean the SetVehicleParamsForPlayer, i guess it the "objective" thing.
Reply
#4

as first what you mean with hook it up? XD and second i dont really understand that setvehicleparamsforplayer.... i already studied it a bit but dont understand it.. is tehre a tut for it? XD
Reply
#5

Quote:
Originally Posted by niels44
Посмотреть сообщение
as first what you mean with hook it up? XD and second i dont really understand that setvehicleparamsforplayer.... i already studied it a bit but dont understand it.. is tehre a tut for it? XD
Yes , what Babul said is the best solution:

Quote:
Originally Posted by Babul
Посмотреть сообщение
maybe you mean the SetVehicleParamsForPlayer, i guess it the "objective" thing.
Example:

pawn Код:
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), playerid, 1, 0);//sets "objective" to 'true'
Reply
#6

thnx for quick reply's guys but eehm where stays that its a downpointing arrow michael? XD
Reply
#7

The 'objective' parameter in SetVehicleParamsForPlayer creates a white-yellowish marker above the car. You cannot change its model or color.
Reply
#8

ah now i understand thnx guys i will try something out and if not works i ask ya again and else i give ya REP!
Reply
#9

hmm yeah i have now made this:
pawn Код:
enum StealInfo
{
    StealName[200],
    PayTax,
    Float:carx,
    Float:cary,
    Float:carz,
    Float:carendx,
    Float:carendy,
    Float:carendz
}
pawn Код:
new StealMissions[][StealInfo] =
{
    {"Steal the Infernus from Las Payasdas Caravan Park to BaySide Docks", 40000,-159.9991,2768.8738,62.5925,-2432.1255,2294.9141,4.9844}
};
new Stealing[MAX_PLAYERS];
new StealCar[MAX_VEHICLES];
pawn Код:
CMD:steal(playerid, params[])
{
    if(Stealing[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "you are already stealing a car!");
    if(Teams[playerid] == DEALER)
    {
        Stealing[playerid] = 1;
        new get = random(sizeof(StealMissions));
        StealCar[0] = AddStaticVehicle(411,-159.9991,2768.8738,62.5925,139.5876,0,3); // stealinfernus
        SetVehicleParamsForPlayer(StealCar[0], playerid, 1, 0);
        new string[128];
        format(string,sizeof(string), "%s", StealMissions[get][StealName]);
        SendClientMessage(playerid, COLOR_GREEN, string);
        return 1;
    }
    else if(Teams[playerid] != DEALER) return SendClientMessage(playerid, COLOR_RED, "ERROR: you aren't a Dealer!");
    return 1;
}
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(Stealing[playerid] == 1)
    {
        new end = random(sizeof(StealMissions));
        SetPlayerCheckpoint(playerid, StealMissions[end][carendx], StealMissions[end][carendy], StealMissions[end][carendz], 5.0);
        return 1;
    }
    return 1;
}
pawn Код:
public OnPlayerEnterCheckpoint( playerid )
{
    if(Stealing[playerid] == 1)
    {
        Stealing[playerid] = 0;
        new earn = random(sizeof(StealMissions));
        DestroyVehicle(StealCar[0]);
        DisablePlayerCheckpoint(playerid);
        new string[200];
        format(string, sizeof(string), "you have succesfully delivered the vehicle and earned: $%d", StealMissions[earn][PayTax]);
        SendClientMessage(playerid, COLOR_BLUE, string);
        return 1;
    }
    return 1;
}
but how do i make it that when a player does /steal a marker gets on the minimap for the player so he knows where the car is...?

greets niels

the one who answers this good will get REP+ and ofc all the others who helped me
Reply
#10

Try this
pawn Код:
CMD:steal(playerid, params[])
{
    if(Stealing[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "you are already stealing a car!");
    if(Teams[playerid] == DEALER)
    {
        Stealing[playerid] = 1;
        new get = random(sizeof(StealMissions));
        StealCar[0] = AddStaticVehicle(411,-159.9991,2768.8738,62.5925,139.5876,0,3); // stealinfernus
        SetVehicleParamsForPlayer(StealCar[0], playerid, 1, 0);
        SetPlayerMapIcon(playerid, 20, -159.9991,2768.8738,62.5925, 0, 0x00FFFFFF, 1); //Added this
        new string[128];
        format(string,sizeof(string), "%s", StealMissions[get][StealName]);
        SendClientMessage(playerid, COLOR_GREEN, string);
        return 1;
    }
    else if(Teams[playerid] != DEALER) return SendClientMessage(playerid, COLOR_RED, "ERROR: you aren't a Dealer!");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)