13.03.2015, 00:53
This isn't a tutorial! You explained nothing, and just gave us code. You cannot do that in this section - either change it to a tutorial form or request a thread move to an appropriate section(such as the filterscript / release section).
You also have some bad scripting habits going on, for example the switch.
Now basically instead of using 2 lines you spread it over 7 - when the results are purely the same. A better code would be:
You also have some bad scripting habits going on, for example the switch.
pawn Code:
switch(rand)
{
case 0:lucky[playerid] = 1,stringer = "Orel";
case 1:lucky[playerid] = 2,stringer = "Reshka";
case 2:lucky[playerid] = 2,stringer = "Reshka";
case 3:lucky[playerid] = 2,stringer = "Reshka";
case 4:lucky[playerid] = 2,stringer = "Reshka";
case 5:lucky[playerid] = 2,stringer = "Reshka";
case 6:lucky[playerid] = 1,stringer = "Orel";
}
pawn Code:
switch(rand)
{
case 0,6:lucky[playerid] = 1,stringer = "Orel";
case 1..5:lucky[playerid] = 2,stringer = "Reshka";
default: return 0; // This shouldn't be called but just in case let's have it return 0.
}