Quote:
Originally Posted by CodeStyle175
what is this thing why are you wasting so much rows with useless code
thats why you have variables, arrays and other things that you dont have to write such sutpid code over and over again.
PHP код:
forward RouletteTimer(playerid);
public RouletteTimer(playerid){
//Green,Red,Black
new string[MAX_STRING],rnd=random(36)+1,color[10];
if (rnd%3==0)color="Black";
else if (rnd%2==0)color="Red";
else if (rnd%1==0)color="Green";
format(string,sizeof(string),"* The wheel lands on %d (%s)* (( %s ))",rnd,color,RPName(playerid);
NearMessage(playerid,string,COLOR_GREEN);
return 1;
}
forward BlackJackTimer(playerid);
public BlackJackTimer(playerid)
{
new string[MAX_STRING]; //
format(string,sizeof(string),"*The card shows %d* (( %s ))",random(11)+1,RPName(playerid));
NearMessage(playerid,string,COLOR_GREEN);
return 1;
}
|
Thanks for that advise, will reduce the code length.
Anyway, i still have the issue where by i am not getting the local table that is only acessible by the players of which joined that specific table.