25.11.2012, 15:59
Hi everyone. I want to ask you what is better to use.
In callback OnPlayerSpawn i have random spawn function which detect position by Team
should i use switch, or if ?
In callback OnPlayerSpawn i have random spawn function which detect position by Team
pawn Code:
if (Team == T_MEDIC)
{
SetPlayerPosEx(playerid, MedicPos[Pos][0], MedicPos[Pos][1], MedicPos[Pos][2], MedicPos[Pos][3]);
}
else if (Team == T_FARMER)
{
....
pawn Code:
switch(Team)
{
case T_MEDIC: SetPlayerPosEx(playerid, MedicPos[Pos][0], MedicPos[Pos][1], MedicPos[Pos][2], MedicPos[Pos][3]);
case T_FARMER: ....