#1

PHP код:
//OnPlayerSpawn
SetTimer("RandBotMsgs"20000true); 
PHP код:
new bmsgTDswitch;
forward RandBotMsgs();
public 
RandBotMsgs()
{
    ForEach(
iMAX_PLAYERS)
    {
    if(
IsPlayerConnected(i))
    {
    
bmsgTDswitch ++;
    switch(
bmsgTDswitch)
    {
        case 
1:
        {
        
TextDrawSetString(Textdraw7,"Welcome to ZoneX Enjoy your stay don't forget to add our server to your favorites~n~~n~~n~");
        }
        case 
2:
        {
        
Topscore();
        }
        case 
3:
        {
        
Topcash();
        }
    case 
4:
    {
        
TextDrawSetString(Textdraw7,"Read ~g~/rules~w~ to avoid getting banned from our server~n~~n~~n~");
        
bmsgTDswitch 0;
    }
      }
          }
      }
    return 
true;

When there is 2 players or more the textdraw be very fast not 8 seconds
Reply
#2

new bmsgTDswitch;
forward RandBotMsgs();
public RandBotMsgs()
{
bmsgTDswitch ++;
switch(bmsgTDswitch)
{
case 1: TextDrawSetString(Textdraw7,"Welcome to ZoneX Enjoy your stay don't forget to add our server to your favorites~n~~n~~n~");
case 2: Topscore();
case 3: Topcash();
case 4:
{
TextDrawSetString(Textdraw7,"Read ~g~/rules~w~ to avoid getting banned from our server~n~~n~~n~");
bmsgTDswitch = 0;
}
}
return true;
}
Reply
#3

That still suffers from the exact same problem. A new message is sent for each connected player, which is not what is desired. I assume these textdraws to be global so there is no need for the loop at all. CobraWoW actually got the right mindset, despite the lack of formatting in his/her post.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)