OnPlayerUpdate [+REPS]
#1

Код:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid,15.0,382.4741,2548.9509,20.1041))
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.2, 0.2, 0.2);
	}
    }
    if(IsPlayerInRangeOfPoint(playerid,15.0,-1185.4705,27.1411,17.6159))
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.2, 0.2, 0.2);
	}
    }

	new InfoString[512];
	if(IsPlayerConnected(playerid))
	{
	if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 10)
	{
	    State[playerid] = "Noob";
	}
    if(GetPlayerScore(playerid) >= 10 && GetPlayerScore(playerid) < 50)
    {
	    State[playerid] = "Newbie";
	}
    if(GetPlayerScore(playerid) >= 51 && GetPlayerScore(playerid) < 101)
    {
	    State[playerid] = "Hero";
	}
    if(GetPlayerScore(playerid) >= 101 && GetPlayerScore(playerid) < 501)
    {
	    State[playerid] = "Adviser";
	}
    if(GetPlayerScore(playerid) >= 501 && GetPlayerScore(playerid) < 2001)
    {
	    State[playerid] = "Judge";
	}
    if(GetPlayerScore(playerid) >= 2001 && GetPlayerScore(playerid) < 5001)
    {
	    State[playerid] = "Advanced";
	}
    if(GetPlayerScore(playerid) >= 5001 && GetPlayerScore(playerid) < 10001)
    {
	    State[playerid] = "Dominator";
	}
    if(GetPlayerScore(playerid) >= 10001 && GetPlayerScore(playerid) < 100001)
    {
	    State[playerid] = "King";
	}
    if(GetPlayerScore(playerid) >= 100001)
    {
	    State[playerid] = "Minister";
	}
	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~N~~g~Rank:~W~ %s", pInfo[playerid][Kills],pInfo[playerid][Deaths],Float:pInfo[playerid][Kills]/Float:pInfo[playerid][Deaths],GetPlayerScore(playerid),State[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;
}
Does this code make server lags ? its like a textdraws stats
Reply


Messages In This Thread
OnPlayerUpdate [+REPS] - by SPA - 07.04.2014, 08:51
Re: OnPlayerUpdate [+REPS] - by ChuckyBabe - 07.04.2014, 08:56
Re: OnPlayerUpdate [+REPS] - by SPA - 07.04.2014, 09:15
Re: OnPlayerUpdate [+REPS] - by iBanner - 07.04.2014, 09:18
Re: OnPlayerUpdate [+REPS] - by Vince - 07.04.2014, 09:35
Re: OnPlayerUpdate [+REPS] - by SPA - 07.04.2014, 10:34

Forum Jump:


Users browsing this thread: 1 Guest(s)