Just a test.
#7

Quote:
Originally Posted by TaLhA XIV
Посмотреть сообщение
How can I do it like if I do /coin the result is random.Like if I do /coin it appears heads,and the second time I do it is also random like no one knows that what is the result,it might come tails or heads.
If you use code by costel_nistor96
pawn Код:
if( strcmp( cmdtext, "/coin", cmdtext, true ) == 0 )
{
    new str[ 128 ];
    GetPlayerName( playerid, str, MAX_PLAYER_NAME );
    switch( random( 2 ) )
    {
        case 0: format( str, 128, "%s flips the coin and lands it on heads", str );
        case 1: format( str, 128, "%s flips the coin and lands it on tails", str );
    }
    SendClientMessageToAll( 0x0780E3FF, str );
    return 1;
}
it will ALWAYS be RANDOM
Reply


Messages In This Thread
Just a test. - by TaLhA XIV - 14.08.2012, 21:05
Re: Just a test. - by IstuntmanI - 14.08.2012, 21:10
Re: Just a test. - by Jefff - 14.08.2012, 21:15
Re: Just a test. - by TaLhA XIV - 14.08.2012, 21:18
Re: Just a test. - by Akcent_Voltaj - 14.08.2012, 21:19
Re: Just a test. - by TaLhA XIV - 15.08.2012, 15:18
Re: Just a test. - by [MM]RoXoR[FS] - 15.08.2012, 15:27
Re: Just a test. - by TaLhA XIV - 15.08.2012, 15:45
Re: Just a test. - by TaLhA XIV - 15.08.2012, 16:06
Re: Just a test. - by TaLhA XIV - 15.08.2012, 16:25

Forum Jump:


Users browsing this thread: 1 Guest(s)