2 Issues
#1

Hello all
I've got 2 issues,I will be glad if someone could help me solve them:

1.I made a lottery script,it was all got,but I changed 1 public of it in a bit:
PHP Code:
public Lotto()
{
new 
WinnersName[24];
SendClientMessageToAllCOLOR_ALINES,"----------[Lotto System]----------");
SendClientMessageToAllCOLOR_LOTTO,"The lotto was finished!");
LottoNumber random(49) + 1;
format(Stringsizeof(String), "The winning number is: %d",LottoNumber);
SendClientMessageToAllCOLOR_LOTTO,String);
new 
WinnersCount;
for(new 
0GetMaxPlayers(); i++) {
if(
IsPlayerConnected(i) && LottoNum[i] == LottoNumber) {
WinnersCount++;
GetPlayerName(i,WinnersName,24);
if(
WinnersCount 1) {
format(Stringsizeof(String), "%s(ID:%d) Won the lotto and got %d$!",WinnersCount,LottoPlayers*1500/WinnersCount);
SendClientMessageToAllCOLOR_LOTTO,String); }
if(
WinnersCount 1) {
format(Stringsizeof(String), "%d Players won the lotto,they are:",WinnersCount);
SendClientMessageToAllCOLOR_LOTTO,String);
format(Stringsizeof(String), ">>%s(ID:%d)",WinnersName,i);
SendClientMessageToAllCOLOR_LOTTO,String);
format(Stringsizeof(String), "Each winner will get %d$!",LottoPlayers*1500/WinnersCount);
SendClientMessageToAllCOLOR_LOTTO,String); }}}
if(!
WinnersCountSendClientMessageToAllCOLOR_LOTTO,"Nobody won the lotto!");
SendClientMessageToAllCOLOR_ALINES,"----------------------------------");
LottoWinners();
LottoOn 0;

I get no errors and no warnings,but if there is more than 1 winner,it posts only the first winner of the lotto.
Could anyone help me spotting the issue?

2.My friend sent me this stock:
PHP Code:
stock SetPlayerRandomColor(playerid)
{
    new 
random(256),random(256),random(256);
    while(
200 && 200 && 200)
    {
        
random(256),random(256),random(256);
    }
    return 
SetPlayerColor(playerid,rgba2hex(r,g,b,100));

But he forgot to give me the rgba2hex stock/include (whatever it is) either and he also claims he can not find it now /=
Does anyone have it's include or an alternative function?


Thanks for all the helpers
Happy Easter!
Reply
#2

Bump..
Reply
#3

We can not know what color you are looking for.
Reply
#4

Quote:
Originally Posted by Max_Coldheart
View Post
We can not know what color you are looking for.
SetPlayerRandomColor(playerid)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)