Random tips on checkpoint
#7

Quote:
Originally Posted by cyberlord
Посмотреть сообщение
tnx u everytone another question is this code works :

Код:
GivePlayerMoney(playerid,random(20)+0);
			if(GivePlayerMoney(playerid,random(20)+0) ==0)
			{
                GameTextForPlayer(playerid,"~r~Fucking greedy old man",3000,3);
			}
			else
			{
                GameTextForPlayer(playerid,"~g~You got %d tip",3000,3,random());
			}
if not please tell my what i did wrong
partially
you would have to format the message
pawn Код:
new cash = random(20);//don't need 0 it's from 0 to 19 but 0 happens rarely
    GivePlayerMoney(playerid,cash);
    if(!cash)//if its 0, we invert it so that the control statement euqals true to get our message displayed
    {
        GameTextForPlayer(playerid,"~r~Fucking greedy old man",3000,3);
    }
    else//anything besides 0
    {
        new str[18];
        format(str,sizeof str,"~g~You got %d tip",cash);
        GameTextForPlayer(playerid,str,3000,3);
    }
Reply


Messages In This Thread
Random tips on checkpoint - by cyberlord - 03.01.2015, 14:52
Re: Random tips on checkpoint - by Neos07 - 03.01.2015, 15:21
Re: Random tips on checkpoint - by PaulDinam - 03.01.2015, 15:25
Re: Random tips on checkpoint - by DavidBilla - 03.01.2015, 15:26
AW: Random tips on checkpoint - by CutX - 03.01.2015, 15:26
Re: Random tips on checkpoint - by cyberlord - 03.01.2015, 15:45
AW: Re: Random tips on checkpoint - by CutX - 03.01.2015, 15:50
Re: Random tips on checkpoint - by cyberlord - 03.01.2015, 16:45

Forum Jump:


Users browsing this thread: 1 Guest(s)