OnPlayerUpdate
#5

a omtimized version of this
pawn Код:
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;
}
Reply


Messages In This Thread
OnPlayerUpdate - by SPA - 12.04.2014, 12:11
Re: OnPlayerUpdate - by Vince - 12.04.2014, 12:19
Re: OnPlayerUpdate - by SPA - 12.04.2014, 12:30
Re: OnPlayerUpdate - by SPA - 12.04.2014, 12:32
Re: OnPlayerUpdate - by BroZeus - 12.04.2014, 12:35
Re: OnPlayerUpdate - by SPA - 12.04.2014, 12:42

Forum Jump:


Users browsing this thread: 1 Guest(s)