Your Advice Needed ...
#2

It looks good code-wise, but there are a few things to consider:
1. If you pass "" (empty string) as the last parameter of ShowPlayerDialog, you will end up with only one button. This is good in scenarios where you don't want the player to have a secondary choice except for choosing their team, for example.

2. Consider using the switch() statement in OnPlayerSpawn and in SetPlayerClass.
pawn Код:
switch(gTeam[playerid])
{
    case TEAM_RUSSIA:
    {
        // ...
    }
    // ...
    case TEAM_ITALY:
    {
        // ...
    }
    return true;
}
It is slightly faster. Keep in mind that the switch() syntax in PAWN is largely different from the syntax of the keyword in PHP,C++, etc.
Reply


Messages In This Thread
Your Advice Needed ... - by Healian - 08.08.2012, 18:42
Re: Your Advice Needed ... - by AndreT - 08.08.2012, 18:46
Re: Your Advice Needed ... - by Nicholas. - 08.08.2012, 18:46
Re: Your Advice Needed ... - by Healian - 08.08.2012, 18:50
Re: Your Advice Needed ... - by Healian - 08.08.2012, 18:56
Respuesta: Re: Your Advice Needed ... - by [DOG]irinel1996 - 08.08.2012, 18:59

Forum Jump:


Users browsing this thread: 1 Guest(s)