A Big Problem (with Round Change)(HELP)
#1

Hi , i checked Kitten's Tutorial but he/she as i think doesn't explain How to make Spawns for Each Team

Ex : There are two Teams:
TEAM1: GreenTeam
Team2: Red Team

so , how to give for Each Team a Position in Each Map ?
i tried that in ongamemodein)
PHP код:
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// 
so with the AddPlayerClass , i can define the Teams:
PHP код:
public OnPlayerRequestClass(playeridclassid)
{
if(
classid == 0)
    {
        
gTeam[playerid] = TEAM_POLICE;
    }
if(
classid == 1)
    {
        
gTeam[playerid] = TEAM_TERRORIST;
    } 
All good at this Time , the Problem is Onplayerspawn :
PHP код:
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;

this is the First Problem ,i want Create a Different Position for Teams in Each Map is the code before working ?

The Problem 2 : What is it ?
Код:
switch ( MapChange  ) { // you must have a case for the mapchange to get the list going
and Must i Put this MapChange= 0; to 1 ?

Thank You . [i know long but Really i need Help Guys )
Reply
#2

Small UP
Reply
#3

pawn Код:
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;
}
Reply
#4

Read wrong, my problem.
Lets see.

Long day at school xD
Reply
#5

Quote:
Originally Posted by SmiT
Посмотреть сообщение
pawn Код:
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;
}
Yeah but , as you know , i want to put a lot of Maps , so the Position of Each Team change in Maps ...
Reply
#6

What's your round scripte..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)