How to remove "SetVehicleParamsForPlayer(vehicleid, playerid)" - 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: How to remove "SetVehicleParamsForPlayer(vehicleid, playerid)" (
/showthread.php?tid=665727)
How to remove "SetVehicleParamsForPlayer(vehicleid, playerid)" -
AngeloBrand98 - 14.04.2019
I made a simple trucking mission, and also put some function when player leave the trucking vehicles, will give time 25 second & marker on the top of car and if he not enter vehicle again will lose the mission,,
The problem is when player enter the vehicle again, the tmyellow marker of the top of car did'nt dissapear, timer works fine but the marker not.. i need a help for destroy the marker,,, thanks and sorry for bad english
Re: How to remove "SetVehicleParamsForPlayer(vehicleid, playerid)" -
polygxn - 14.04.2019
Provide some code.
Re: How to remove "SetVehicleParamsForPlayer(vehicleid, playerid)" -
Logic_ - 14.04.2019
Check the samp wiki properly.
Re: How to remove "SetVehicleParamsForPlayer(vehicleid, playerid)" -
AngeloBrand98 - 14.04.2019
Quote:
Originally Posted by polygxn
Provide some code.
|
Here is the code:
Quote:
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(IsInTMis[playerid]==1 && GetVehicleModel(vehicleid)==403)
{
pvtime[playerid] = 25;
pvtimer[playerid] = SetTimerEx("pvTimeDown", 1000, 1, "d", playerid);
SetPVarInt(playerid, "LastVehicle", vehicleid);
}
return 1;
}
|
Quote:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(IsInTMis[playerid]==1 && GetVehicleModel(vehicleid)==514)
{
KillTimer(pvtimer[playerid]);
pvtime[playerid]=0;
SetVehicleParamsForPlayer(vid, playerid, 0, 0);
}
|
Re: How to remove "SetVehicleParamsForPlayer(vehicleid, playerid)" -
polygxn - 14.04.2019
pawn Code:
pvtime[playerid] = 25;
pvtimer[playerid] = SetTimerEx("pvTimeDown", 1000, 1, "d", playerid);
This is not how you use timers. Take a look here:
https://sampwiki.blast.hk/wiki/SetTimerEx
pawn Code:
SetTimerEx("pvTimeDown", 1000*25, 0, "d", playerid);
Also, read what the "note" says:
https://sampwiki.blast.hk/wiki/SetVehicleParamsForPlayer