20.04.2016, 20:28
PHP код:
new PlayerText:LotteryButton[MAX_PLAYERS][5];
new Lottery[MAX_PLAYERS][5];
new LotteryTry[MAX_PLAYERS];
OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid){
if(_:playertextid != INVALID_TEXT_DRAW){
new cnt=LotteryTry[playerid];
for(new i; i < 5; i++){
if(Lottery[playerid][i]==playertextid){
Lottery[playerid][cnt]=i+1;
LotteryTry[playerid]++;
if(LotteryTry[playerid]!=5){
//...ShowTDagain
}else{
scm(playerid,-1,"You have selected all your numbers.");
}
break;
}
}
return 1;
}