TextDraw is not going off after use the command again - 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: TextDraw is not going off after use the command again (
/showthread.php?tid=553831)
TextDraw is not going off after use the command again -
lulo356 - 31.12.2014
pawn Код:
CMD:dcam(playerid, params[])
{
if(DashCamActivated[playerid] == false)
{
if(IsPlayerInAnyVehicle(playerid))
{
new vehid = GetPlayerVehicleID (playerid);
if(IsACop(playerid))
{
if (VehRadarID [vehid] == -1) return 1;
foreach(Player, i)
{
CheckingSpeed [vehid] = SetTimerEx ("UpdateSpeed", 100, 1, "d", vehid);
PlayerTextDrawShow (i,RadarHud[i]);
PlayerTextDrawShow (i,VehicleModel[i]);
PlayerTextDrawShow (i,DashCamText);
DashCamActivated[playerid] = true;
}
}
else
{
DashCamActivated[playerid] = false;
if(CheckingSpeed[vehid] > 0)
{
foreach(Player, i)
{
KillTimer (CheckingSpeed [vehid]);
CheckingSpeed [vehid] = -1;
PlayerTextDrawHide (i, RadarHud[i]);
PlayerTextDrawHide (i, VehicleModel[i]);
PlayerTextDrawHide (i, DashCamText);
}
}
}
}
}
return 1;
}
Re: TextDraw is not going off after use the command again -
TheCoopster - 31.12.2014
Try this.
pawn Код:
CMD:dcam(playerid, params[])
{
if(DashCamActivated[playerid] == false)
{
if(IsPlayerInAnyVehicle(playerid))
{
new vehid = GetPlayerVehicleID (playerid);
if(IsACop(playerid))
{
if (VehRadarID [vehid] == -1) return 1;
foreach(Player, i)
{
CheckingSpeed [vehid] = SetTimerEx ("UpdateSpeed", 100, 1, "d", vehid);
PlayerTextDrawShow (i,RadarHud[i]);
PlayerTextDrawShow (i,VehicleModel[i]);
PlayerTextDrawShow (i,DashCamText);
DashCamActivated[playerid] = true;
}
}
}
}
else
{
DashCamActivated[playerid] = false;
if(CheckingSpeed[vehid] > 0)
{
foreach(Player, i)
{
KillTimer (CheckingSpeed [vehid]);
CheckingSpeed [vehid] = -1;
PlayerTextDrawHide (i, RadarHud[i]);
PlayerTextDrawHide (i, VehicleModel[i]);
PlayerTextDrawHide (i, DashCamText);
}
}
}
return 1;
}
Re: TextDraw is not going off after use the command again -
lulo356 - 31.12.2014
Works thanks, but when a other players in in the same range of the other players that used /dcam it bugs
Re: TextDraw is not going off after use the command again -
lulo356 - 31.12.2014
Its now not working anymore, its not going to hide the player textdraw please help me