[HELP]TextDraw Problem[HELP]!!!
#7

At top add
pawn Код:
new Text:vSpeed[MAX_PLAYERS];
new uSpeed[MAX_PLAYERS];
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
      new vString[128];
      format(vString,sizeof(vString),"Speed:%d",GetPlayerSpeed(playerid));
      TextDrawSetString(vSpeed[playerid],vString);
      TextDrawShowForPlayer(playerid,vSpeed[playerid]);
      uSpeed[playerid] = SetTimerEx("UpdateSpeed",1000,true,"i",playerid);
         if(oldstate == PLAYER_STATE_DRIVER&&newstate==PLAYER_STATE_ONFOOT)
         {
        TextDrawHideForPlayer(playerid,vSpeed[playerid]);
        KillTimer(uSpeed[playerid]);
     }
   }
}

pawn Код:
public OnGameModeInit()
{
    for(new i=0;i<MAX_PLAYERS;++i)
    {
      vSpeed[i] = TextDrawCreate(x,y,"_");//Replace X,Y with coordinates.
      TextDrawAlignment(vSpeed[i],3);
      TextDrawColor(vSpeed[i],COLOR_WHITE);
      TextDrawFont(vSpeed[i],0);
    }
    return 1;
}
Reply


Messages In This Thread
[HELP]TextDraw Problem[HELP]!!! - by Cjgogo - 10.07.2012, 08:08
Re: [HELP]TextDraw Problem[HELP]!!! - by SomebodyAndMe - 10.07.2012, 08:11
Re: [HELP]TextDraw Problem[HELP]!!! - by Cjgogo - 10.07.2012, 08:28
Re: [HELP]TextDraw Problem[HELP]!!! - by Vince - 10.07.2012, 08:31
Re: [HELP]TextDraw Problem[HELP]!!! - by Cjgogo - 10.07.2012, 08:38
Re: [HELP]TextDraw Problem[HELP]!!! - by Cjgogo - 11.07.2012, 07:47
Re: [HELP]TextDraw Problem[HELP]!!! - by [MM]RoXoR[FS] - 11.07.2012, 10:32

Forum Jump:


Users browsing this thread: 1 Guest(s)