format ( str1 , 50 , "Yes:~r~%d " , Yes ) ;
TextDrawSetString ( mVote4 , str1 ) ;
format ( str2 , 50 , "No:~r~%d " , No ) ;
TextDrawSetString ( mVote5 , str2 ) ;
if ( VotedFor == 0 ) { map = "Ghost Village" ; } else if ( VotedFor == 1 ) { map = "Ghost Town" ; }
format ( str3 , 256 , "Vote for map:~r~%s " , map ) ;
TextDrawSetString ( mVote0 , str3 ) ;
loop ( i , MAX_PLAYERS )
{
TextDrawShowForPlayer ( i , mVote0 ) ;
TextDrawShowForPlayer ( i , mVote4 ) ;
TextDrawShowForPlayer ( i , mVote5 ) ;
}
First of all : Why OnPlayerUpdate?
Second of all: If you're executing this code in OnPlayerUpdate, why do you loop ALL players? you know the time taken to loop everything will grow exponentially? with two players you have 4 loops, with 100 players 10000 loops, 500 players 250000 loops and 1000 players - an astonishing ONE MILLION LOOPS. |