Help [+REPS] - 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: Help [+REPS] (
/showthread.php?tid=506625)
Help [+REPS] -
SPA - 13.04.2014
Hi, i have a problem this code:
Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(IsPlayerInRangeOfPoint(playerid,15.0,382.4741,2548.9509,20.1041))SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.2, 0.2, 0.2);
if(IsPlayerInRangeOfPoint(playerid,15.0,-1185.4705,27.1411,17.6159))SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.2, 0.2, 0.2);
}
new InfoString[512];
if(IsPlayerNPC(playerid)) return 0;
format(InfoString, sizeof(InfoString), "Kills: ~w~~W~%d~N~~r~Deaths: ~W~%d~N~~P~Ratio:~W~ %0.2f~N~~Y~Score: ~W~%d", pInfo[playerid][Kills],pInfo[playerid][Deaths],Float:pInfo[playerid][Kills]/Float:pInfo[playerid][Deaths],GetPlayerScore(playerid));
TextDrawSetString(PPing[playerid], InfoString);
#if PauseDetectSystem == true
pTick[playerid] = GetTickCount();
#endif
#if MoveSystem == true
if(pInfo[playerid][Move] == 1)
GetPlayerHoldingKey(playerid);
#endif
return 1;
}
Is working fine , but after 1 days from turning the server text draw hide for no reason so player not see his stats only if restarted server its working , why is that happened?
Re : Help [+REPS] -
S4t3K - 13.04.2014
It's highly recommended to
not put Textdraws in OnPlayerUpdate. Try to use a Thread (****** search with keywords "samp thread plugin") or set a timer.
It may comes from that. But I'm not sure at all.
Re: Help [+REPS] -
SPA - 13.04.2014
mmmmmmmmmmmmmmm i dont think that :/ bump
Re: Help [+REPS] -
SPA - 13.04.2014
Bump :S