Just a test.
#3

or
pawn Код:
#define conv(%0,%1,%2) ((!%0) ? (%1) : (%2))

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/coin", cmdtext, true) == 0)
    {
        new str[150];
        static result;
        result %= 2;
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), "{0780E3}%s flips the coin and lands it on %s", str,conv(result,"heads","tails"));
        SendClientMessageToAll(-1,str);
        result++;
        return 1;
    }
    return 0;
}
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: 2 Guest(s)