01.11.2011, 08:33
(
Последний раз редактировалось Sasino97; 01.11.2011 в 09:04.
)
This tutorial is an epic fail:
1.
2. At the start of your gamemode you putted this:
But at SetPlayerTeamFromClass you added TEAM_AZTECAS that didn't exist before -.-
3. Look at your OnPlayerRequestClass
Case 0 is Identical to case 1
Another , you could have done this way:
1.
Quote:
now its time for textdraw for this part i cant explain. |
pawn Код:
#define TEAM_BALLAS 1 //Team ID for Ballas
#define TEAM_GROVE 2 //Team ID for Grove
#define TEAM_VAGOS 3 //Team ID for Vagos
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
if (classid == TEAM_BALLAS)
{
gTeam[playerid] = TEAM_BALLAS;
}
else if (classid == TEAM_GROVE)
{
gTeam[playerid] = TEAM_GROVE;
}
else if (classid == TEAM_VAGOS)
{
gTeam[playerid] = TEAM_VAGOS;
}
else if (classid == TEAM_AZTECAS)
{
gTeam[playerid] = TEAM_AZTECAS;
}
}
Case 0 is Identical to case 1
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
case 0: //ID 102 - Ballas
{
SetPlayerTeam(playerid,TEAM_BALLAS);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1873.4159,-1742.0531,13.5369);
SetPlayerFacingAngle(playerid, 178);
SetPlayerCameraLookAt(playerid,1873.4159,-1742.0531,13.5369);
SetPlayerCameraPos(playerid, 1873.1909,-1746.9408,13.5469);
SetPlayerColor(playerid, COLOR_VIOLET);
TextDrawHideForPlayer(playerid, GroveTittle);
TextDrawHideForPlayer(playerid, GroveWeap1);
TextDrawHideForPlayer(playerid, GroveWeap2);
TextDrawHideForPlayer(playerid, GroveWeap3);
TextDrawHideForPlayer(playerid, GroveWeap4);
TextDrawShowForPlayer(playerid, BallasTittle);
TextDrawShowForPlayer(playerid, BallasWeap1);
TextDrawShowForPlayer(playerid, BallasWeap2);
TextDrawShowForPlayer(playerid, BallasWeap3);
TextDrawShowForPlayer(playerid, BallasWeap4);
}
case 1: //ID 103 - Ballas
{
SetPlayerTeam(playerid,TEAM_BALLAS);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1873.4159,-1742.0531,13.5369);
SetPlayerFacingAngle(playerid, 178);
SetPlayerCameraLookAt(playerid,1873.4159,-1742.0531,13.5369);
SetPlayerCameraPos(playerid, 1873.1909,-1746.9408,13.5469);
SetPlayerColor(playerid, COLOR_VIOLET);
TextDrawHideForPlayer(playerid, GroveTittle);
TextDrawHideForPlayer(playerid, GroveWeap1);
TextDrawHideForPlayer(playerid, GroveWeap2);
TextDrawHideForPlayer(playerid, GroveWeap3);
TextDrawHideForPlayer(playerid, GroveWeap4);
TextDrawShowForPlayer(playerid, BallasTittle);
TextDrawShowForPlayer(playerid, BallasWeap1);
TextDrawShowForPlayer(playerid, BallasWeap2);
TextDrawShowForPlayer(playerid, BallasWeap3);
TextDrawShowForPlayer(playerid, BallasWeap4);
}
//[...]
Another , you could have done this way:
Код:
case 0, 1, 2: // { SetPlayerTeam(playerid,TEAM_BALLAS); SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, 1873.4159,-1742.0531,13.5369); SetPlayerFacingAngle(playerid, 178); SetPlayerCameraLookAt(playerid,1873.4159,-1742.0531,13.5369); SetPlayerCameraPos(playerid, 1873.1909,-1746.9408,13.5469); SetPlayerColor(playerid, COLOR_VIOLET); TextDrawHideForPlayer(playerid, GroveTittle); TextDrawHideForPlayer(playerid, GroveWeap1); TextDrawHideForPlayer(playerid, GroveWeap2); TextDrawHideForPlayer(playerid, GroveWeap3); TextDrawHideForPlayer(playerid, GroveWeap4); TextDrawShowForPlayer(playerid, BallasTittle); TextDrawShowForPlayer(playerid, BallasWeap1); TextDrawShowForPlayer(playerid, BallasWeap2); TextDrawShowForPlayer(playerid, BallasWeap3); TextDrawShowForPlayer(playerid, BallasWeap4); }