AddPlayerClass(285,-4198.6240,395.5814,26.1159,18.4021,0,0,0,0,0,0);//Police//
AddPlayerClass(272,-4253.7134,463.4392,29.7993,359.6018,0,0,0,0,0,0);//Terrorist//
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 0)
{
gTeam[playerid] = TEAM_POLICE;
}
if(classid == 1)
{
gTeam[playerid] = TEAM_TERRORIST;
}
public OnPlayerSpawn(playerid) { // OnPlayerSpawn Callback
switch ( MapChange ) { // you must have a case for the mapchange to get the list going
case 0: { // MapChange1 this is the part for MapChange = 0; Which basically starts of the first MapChangein the list
if(gTeam[playerid] == TEAM_POLICE)
{
SetPlayerPos(playerid , -4198.6240,395.5814,26.1159,18.4021);
SetPlayerFacingAngle(playerid,0.0); // Facing Angle of the first map
}
}
case 1: { // MapChange2 same settings on top
SetPlayerFacingAngle(playerid,0.0);
}
case 2: { // blah blah next MapChangestuff here
}
}
return 1;
}
switch ( MapChange ) { // you must have a case for the mapchange to get the list going
public OnPlayerSpawn(playerid)
{
switch ( gTeam[ playerid ] )
{
case TEAM_POLICE:
{
SetPlayerPos( ... ); // Set spawn for team_police
}
case TEAM_TERRORIST:
{
SetPlayerPos( ... ); // Set spawn for team_terrorist
}
}
return 1;
}
pawn Код:
|