Lottery system
#1

Hey guys,
My RP GM had a lottery system but im trying to change it to a textdraw based one. Currently i got all the textdraws and everything but i have been thinking and i just can't figure out how to store the numbers of the textdraw in the correct order people press them. Like imagine their 5 numbers are 1, 2 ,3 ,4 ,5 what im trying to know is when the player presses the 1 how to save it as the first number then the second time he presses another number it saves it as second etc...

I would apreciate if someone could help me plz

cumpz,
Vasco
Reply
#2

PHP код:
new PlayerText:LotteryButton[MAX_PLAYERS][5];
new 
Lottery[MAX_PLAYERS][5];
new 
LotteryTry[MAX_PLAYERS];
OnPlayerClickPlayerTextDraw(playeridPlayerText:playertextid){
if(
_:playertextid != INVALID_TEXT_DRAW){
new 
cnt=LotteryTry[playerid];
for(new 
i5i++){
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;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)