02.11.2012, 01:12
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:
But when I try to remove the objective (set to 0), the marker doesn't disappear:
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):
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.
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);
Код:
SetVehicleParamsForPlayer(PetrolObj, playerid, 0, 0); SetVehicleParamsForPlayer(LinerunnerObj, playerid, 0, 0);
Код:
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;
}
Thanks.

