How to remove "SetVehicleParamsForPlayer(vehicleid, playerid)"
#1

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
Reply
#2

Provide some code.
Reply
#3

Check the samp wiki properly.
Reply
#4

Quote:
Originally Posted by polygxn
View Post
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);
}

Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)