14.10.2011, 13:13
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)
so with the AddPlayerClass , i can define the Teams:
All good at this Time , the Problem is Onplayerspawn :
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 ?
and Must i Put this MapChange= 0; to 1 ?
Thank You . [i know long but Really i need Help Guys )
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//
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 0)
{
gTeam[playerid] = TEAM_POLICE;
}
if(classid == 1)
{
gTeam[playerid] = TEAM_TERRORIST;
}
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;
}
The Problem 2 : What is it ?
Код:
switch ( MapChange ) { // you must have a case for the mapchange to get the list going
Thank You . [i know long but Really i need Help Guys )