View Single Post
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 04-22-2012 , 05:37   Re: [CSS] Add the hud capibilities!
Reply With Quote #19

Quote:
Originally Posted by Mitchell View Post
orrrr:
PHP Code:

new Colorz;

public 
OnPluginStart()
{
    
CreateTimer(0.1Timer_Update_TIMER_REPEAT);
    
Colorz 0;
}

public 
Action:Timer_Update(Handle:timer
{
    
    for (new 
1<= MaxClientsx++)
    {
        if (
IsClientInGame(x) && IsPlayerAlive(x))
        {
            if(
Colorz== 0)
                
SendMsg_HudMsg(x1, -1.0, -0.85255002550255025500.050.050.10.1"Mitch Was Here");
            if(
Colorz == 1)
                
SendMsg_HudMsg(x1, -1.0, -0.85025502550025525500.050.050.10.1"Mitch Was Here");
            if(
Colorz == 2)
                
SendMsg_HudMsg(x1, -1.0, -0.85002552552550025500.050.050.10.1"Mitch Was Here");
            
Colorz += 1;
            if(
Colorz 2)
                
Colorz 0;
            
        }
    }
}
// "HudMsg" message
stock SendMsg_HudMsg(clientchannel
                    
Float:xFloat:y
                    
aRclraGclraBclraTclr
                    
bRclrbGclrbBclrbTclr
                    
effect
                    
Float:fadeinFloat:fadeout
                    
Float:holdtimeFloat:fxtime
                    const 
String:szMsg[])
{
  new 
Handle:hBf;
  if (!
client)
     
hBf StartMessageAll("HudMsg");
  else 
hBf StartMessageOne("HudMsg"client);
  if (
hBf != INVALID_HANDLE)
  {
     
BfWriteByte(hBfchannel); //channel
     
BfWriteFloat(hBfx); // x ( -1 = center )
     
BfWriteFloat(hBfy); // y ( -1 = center )
     // second color
     
BfWriteByte(hBfaRclr); //r1
     
BfWriteByte(hBfaGclr); //g1
     
BfWriteByte(hBfaBclr); //b1
     
BfWriteByte(hBfaTclr); //a1 // transparent?
     // init color
     
BfWriteByte(hBfbRclr); //r2
     
BfWriteByte(hBfbGclr); //g2
     
BfWriteByte(hBfbBclr); //b2
     
BfWriteByte(hBfbTclr); //a2
     
BfWriteByte(hBfeffect); //effect (0 is fade in/fade out; 1 is flickery credits; 2 is write out)
     
BfWriteFloat(hBffadein); //fadeinTime (message fade in time - per character in effect 2)
     
BfWriteFloat(hBffadeout); //fadeoutTime
     
BfWriteFloat(hBfholdtime); //holdtime
     
BfWriteFloat(hBffxtime); //fxtime (effect type(2) used)
     
BfWriteString(hBfszMsg); //Message
     
EndMessage();
  }



Do you have a topic where they said they refused to add it in?
not working.
__________________
retired
shavit is offline