14.08.2016, 18:37
Quote:
public OnPlayerRequestClass(playerid, classid) { return 1; } switch(classid) { case 0 .. 14: { gTeam[playerid] = GROVE; } case 15 .. 20: { gTeam[playerid] = AZTEC; } case 21 .. 27: { gTeam[playerid] = TRIAD; } case 28 .. 31: { gTeam[playerid] = BALLA; } case 32 .. 35: { gTeam[playerid] = VAGOS; } case 36 .. 41: { gTeam[playerid] = RIFFA; } case 42 .. 50: { gTeam[playerid] = ITALI; } case 51 .. 56: { gTeam[playerid] = TRIAD; } } |
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0 .. 14:
{
gTeam[playerid] = GROVE;
}
case 15 .. 20:
{
gTeam[playerid] = AZTEC;
}
case 21 .. 27:
{
gTeam[playerid] = TRIAD;
}
case 28 .. 31:
{
gTeam[playerid] = BALLA;
}
case 32 .. 35:
{
gTeam[playerid] = VAGOS;
}
case 36 .. 41:
{
gTeam[playerid] = RIFFA;
}
case 42 .. 50:
{
gTeam[playerid] = ITALI;
}
case 51 .. 56:
{
gTeam[playerid] = TRIAD;
}
}
return 1;
}
PHP код:
forward SetupPlayerForClassSelection(playerid);
public SetupPlayerForClassSelection(playerid)
{
// Set the player's orientation when they're selecting a class.
SetPlayerPos(playerid,1984.4445,157.9501,55.9384);
SetPlayerCameraPos(playerid,1984.4445,160.9501,55.9384);
SetPlayerCameraLookAt(playerid,1984.4445,157.9501,55.9384);
SetPlayerFacingAngle(playerid,0.0);
}
PHP код:
SetupPlayerForClassSelection(playerid);