Bug with SetPlayerVehicleParams (objectives) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Bug with SetPlayerVehicleParams (objectives) (
/showthread.php?tid=389431)
Bug with SetPlayerVehicleParams (objectives) -
simstosh - 02.11.2012
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.
Re: Bug with SetPlayerVehicleParams (objectives) -
simstosh - 10.11.2012
I almost forgot this topic, but still have this problem.
Bump!