public OnGameModeInit();
{
AddPlayerClassEx(TEAM_CITIZEN,2,2321.7683,-2078.6880,13.5469,91.7119,1,1,0,0,0,0);
AddPlayerClassEx(TEAM_CITIZEN,55,2321.7683,-2078.6880,13.5469,91.7119,1,1,0,0,0,0);
AddPlayerClassEx(TEAM_COP,280,1553.2623,-1675.2860,16.1953,92.7704,3,1,0,0,0,0);
AddPlayerClassEx(TEAM_COP,282,1553.2623,-1675.2860,16.1953,92.7704,3,1,0,0,0,0);
AddPlayerClassEx(TEAM_CRIMINAL,29,2748.2466,-2448.6731,13.6484,166.0463,5,1,0,0,0,0);
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid,1133.0504,-2038.4034,69.1000);
SetPlayerFacingAngle(playerid,0.0);
SetPlayerCameraPos(playerid,1133.0504,-2035.4034,69.1000);
SetPlayerCameraLookAt(playerid,1133.0504,-2038.4034,69.1000);
if(GetPlayerJobID(playerid) == 1)
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~w~Citizen",50000, 3);
}
else if(GetPlayerJobID(playerid) == 2)
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~b~Police Officer",50000, 3);
}
else if(GetPlayerJobID(playerid) == 3)
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~r~Criminal",50000, 3);
}
return 1;
}
public OnGameModeInit();
{
AddPlayerClassEx(TEAM_CITIZEN,2,2321.7683,-2078.6880,13.5469,91.7119,1,1,0,0,0,0); //case 1
AddPlayerClassEx(TEAM_CITIZEN,55,2321.7683,-2078.6880,13.5469,91.7119,1,1,0,0,0,0);
AddPlayerClassEx(TEAM_COP,280,1553.2623,-1675.2860,16.1953,92.7704,3,1,0,0,0,0);
AddPlayerClassEx(TEAM_COP,282,1553.2623,-1675.2860,16.1953,92.7704,3,1,0,0,0,0);
AddPlayerClassEx(TEAM_CRIMINAL,29,2748.2466,-2448.6731,13.6484,166.0463,5,1,0,0,0,0);
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid,1133.0504,-2038.4034,69.1000);
SetPlayerFacingAngle(playerid,0.0);
SetPlayerCameraPos(playerid,1133.0504,-2035.4034,69.1000);
SetPlayerCameraLookAt(playerid,1133.0504,-2038.4034,69.1000);
if(GetPlayerJobID(playerid) == 1)
{
case 1,2:
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~w~Citizen",50000, 3);
}
}
else if(GetPlayerJobID(playerid) == 2)
{
case 3,4:
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~b~Police Officer",50000, 3);
}
}
else if(GetPlayerJobID(playerid) == 3)
{
case 5:
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~r~Criminal",50000, 3);
}
}
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0, 1: // Class the player is currently seeing is ID 0 (Citizen) or ID 1 (Citizen)
{
GameTextForPlayer(playerid,"Citizen",50000,3);
}
case 2, 3: // Class the player is currently seeing is ID 2 (Cop) or ID 3 (Cop)
{
GameTextForPlayer(playerid,"Cop",50000,3);
}
case 4: // Class the player is currently seeing is ID 4 (Criminal)
{
GameTextForPlayer(playerid,"Citizen",50000,3);
}
}
return 1;
}
GetPlayerJobID? You must be talking shit. Also you're using 'cases' and you haven't even used switch?
You got to do it like this pawn Код:
|
AddPlayerClass(SKIN, ClassPos, ClassAngle, 0, 0, 0, 0, 0, 1);
AddPlayerClass(SKIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
AddPlayerClass(SKIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1); //Change SKIN to the skin Id's
if(classid == 0) //The amount of player classes you have added above (3)
{
SetPlayerPos(playerid,1133.0504,-2038.4034,69.1000);
SetPlayerFacingAngle(playerid,0.0);
SetPlayerCameraPos(playerid,1133.0504,-2035.4034,69.1000);
SetPlayerCameraLookAt(playerid,1133.0504,-2038.4034,69.1000);
gTeam[playerid] = TEAM_POLICE;
GameTextForPlayer(playerid, "Police!", 4000, 6);
SetPlayerColor(playerid,COLOR); //Change COLOR to the players team color
}
if(classid == 1) //The amount of player classes you have added above (3)
{
SetPlayerPos(playerid,1133.0504,-2038.4034,69.1000);
SetPlayerFacingAngle(playerid,0.0);
SetPlayerCameraPos(playerid,1133.0504,-2035.4034,69.1000);
SetPlayerCameraLookAt(playerid,1133.0504,-2038.4034,69.1000);
gTeam[playerid] = TEAM_CITIZEN;
GameTextForPlayer(playerid, "Citizen!", 4000, 6);
SetPlayerColor(playerid,COLOR); //Change COLOR to the players team color
}
if(classid == 2) //The amount of player classes you have added above (3)
{
SetPlayerPos(playerid,1133.0504,-2038.4034,69.1000);
SetPlayerFacingAngle(playerid,0.0);
SetPlayerCameraPos(playerid,1133.0504,-2035.4034,69.1000);
SetPlayerCameraLookAt(playerid,1133.0504,-2038.4034,69.1000);
gTeam[playerid] = TEAM_CRIMINAL;
GameTextForPlayer(playerid, "Criminal!", 4000, 6);
SetPlayerColor(playerid,COLOR); //Change COLOR to the players team color
}