Bug with SetPlayerVehicleParams (objectives)
#1

Hi.

I'm making a script using SetPlayerVehicleParams to define the vehicle as an objective.

When I set the mark at the vehicle, everything works fine, the objective marker shows properly:
Код:
SetVehicleParamsForPlayer(PetrolObj, playerid, 1, 0);
SetVehicleParamsForPlayer(LinerunnerObj, playerid, 1, 0);
But when I try to remove the objective (set to 0), the marker doesn't disappear:
Код:
SetVehicleParamsForPlayer(PetrolObj, playerid, 0, 0);
SetVehicleParamsForPlayer(LinerunnerObj, playerid, 0, 0);
I have created a simple command to test the SetVehicleParamsForPlayer, he set the marker for the vehicles, but he doesn't remove them (1 and 2 sets and removes (in this order) for 1 vehicle, and 3 and 4 does the same for the other vehicle):
Код:
    if(strcmp(cmd, "/seta", true) == 0)
    {
        tmp = strtok(cmdtext,idx);
        new val = strval(tmp);

        if(!val || val < 1 || val > 4)
        {
            SendClientMessage(playerid, COLOR_RED, "Faltou parametro");
            return 1;
        }

        if(val == 1)
        {
            SetVehicleParamsForPlayer(PetrolObj, playerid, 1, 0);
            return 1;
        }
        if(val == 2)
        {
            SetVehicleParamsForPlayer(PetrolObj, playerid, 0, 0);
            return 1;
        }
        if(val == 3)
        {
            SetVehicleParamsForPlayer(LinerunnerObj, playerid, 1, 0);
            return 1;
        }
        if(val == 4)
        {
            SetVehicleParamsForPlayer(LinerunnerObj, playerid, 0, 0);
            return 1;
        }
I tried to search in the forums about this, but haven't find any solution. Is this a bug in SA-MP or what?

Thanks.
Reply
#2

I almost forgot this topic, but still have this problem.
Bump!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)