06.08.2012, 22:48
I added 1 more team to my team selection called special ops, but now there is an extra class and the skin is CJ. It's odd but I Think If I gave you my codes you might be able to spot something wrong
OnPlayerRequestClass
===================DEFINES=============
=================SPAWNS====================
That's pretty much it, anything wrong? Thanks in advance
OnPlayerRequestClass
Код:
public OnPlayerRequestClass(playerid, classid) { switch(classid) { case 0: { gTeam[playerid] = TEAM_AMERICA; GameTextForPlayer(playerid, "~r~America", 5000, 5); PlayerPlaySound(playerid,1097,1955.8129,-2181.6062,13.5865); SetPlayerPos(playerid,2480.3538,1870.8656,24.3753); SetPlayerCameraPos(playerid,2473.7202,1870.9253,25.7971); SetPlayerCameraLookAt(playerid,2480.3538,1870.8656,24.3753); SetPlayerFacingAngle(playerid,86.9258); } case 1: { gTeam[playerid] = TEAM_RUSSIA; GameTextForPlayer(playerid, "~r~Russia", 5000, 5); PlayerPlaySound(playerid,1097,1955.8129,-2181.6062,13.5865); SetPlayerPos(playerid,2480.3538,1870.8656,24.3753); SetPlayerCameraPos(playerid,2473.7202,1870.9253,25.7971); SetPlayerCameraLookAt(playerid,2480.3538,1870.8656,24.3753); SetPlayerFacingAngle(playerid,86.9258); } case 2: { gTeam[playerid] = TEAM_EUROPE; GameTextForPlayer(playerid, "~r~Europe", 5000, 5); PlayerPlaySound(playerid,1097,1955.8129,-2181.6062,13.5865); SetPlayerPos(playerid,2480.3538,1870.8656,24.3753); SetPlayerCameraPos(playerid,2473.7202,1870.9253,25.7971); SetPlayerCameraLookAt(playerid,2480.3538,1870.8656,24.3753); SetPlayerFacingAngle(playerid,86.9258); } case 3: { gTeam[playerid] = TEAM_SPECIAL; GameTextForPlayer(playerid, "~r~Special Ops", 5000, 5); PlayerPlaySound(playerid,1097,1955.8129,-2181.6062,13.5865); SetPlayerPos(playerid,2480.3538,1870.8656,24.3753); SetPlayerCameraPos(playerid,2473.7202,1870.9253,25.7971); SetPlayerCameraLookAt(playerid,2480.3538,1870.8656,24.3753); SetPlayerFacingAngle(playerid,86.9258); } } SetPlayerToTeamColour(playerid); // calls the custom function { } return 1; } SetPlayerToTeamColour(playerid) { if(gTeam[playerid] == TEAM_AMERICA) { SetPlayerColor(playerid,COLOR_BLUE); } else if(gTeam[playerid] == TEAM_RUSSIA) { SetPlayerColor(playerid,COLOR_YELLOW); } else if(gTeam[playerid] == TEAM_EUROPE) { SetPlayerColor(playerid,COLOR_GREEN); } else if (gTeam[playerid] == TEAM_SPECIAL) { SetPlayerColor(playerid,COLOR_RED); } }
Код:
//#define FILTERSCRIPT //________________________________// //__________TEAM DEFINES__________// #define TEAM_AMERICA 0//__________// #define TEAM_RUSSIA 1 #define TEAM_EUROPE 2//______________// #define TEAM_SPECIAL 3 //_______________________________// #define AMERICASPAWN "185.6111, 1929.7433, 17.7739" #define RUSSIASPAWN "397.0037,2523.6655,16.4844" #define EUROPESPAWN "-342.8130,1542.2687,75.5625" #define SPECIALSPAWN "-1342.4137,501.5643,18.2344,358" #define AMERICACOLOR "COLOR_BLUE" #define RUSSIACOLOR "COLOR_YELLOW" #define EUROPECOLOR "COLOR_GREEN" #define SPECIALCOLOR "COLOR_RED"
Код:
// America AddPlayerClass(287,186.5623,1934.6904,17.7369,180.6349,0,0,0,0,0,0); // Russia AddPlayerClass(206,-343.6414,1530.3071,75.3570,266.9718,0,0,0,0,0,0); //Europe AddPlayerClass(285,409.1201,2520.4456,16.4844,0.4212,0,0,0,0,0,0); // Special AddPlayerClass(217,-1342.1843,501.3151,18.4344,3.7669,0,0,0,0,0,0);
That's pretty much it, anything wrong? Thanks in advance