16.09.2015, 14:12
Well, as far as i can see that you have added army class with class id 0 and inside OnPlayerRequestClass, you are setting the player's team to cop at classid 0.
In the case, class id 0 should be army not cop. That's probably the reason why it is mixing up.
And for the 1700 score to be army, it shouldn't be on spawn. Check it under OnPlayerRequestSpawn instead;
Код:
AddPlayerClass(287,-1315.9380,437.7021,7.1875,4.0838,0,0,0,0,0,0); // army AddPlayerClass(283,-1596.3175,733.3856,-4.9063,4.0007,0,0,0,0,0,0); // Cop //Civil AddPlayerClass(1, -2719.8279,-318.5510,7.8438, 45.3150,0,0,0,0,0,0);
Код:
public OnPlayerRequestClass(playerid, classid) { switch(classid) { case 0: { gTeam[playerid] = Cops; GameTextForPlayer(playerid, "~b~Cop", 5000, 5); SetPlayerPos(playerid,283, -2860.4360, -342.8072, 14.2333); SetPlayerFacingAngle(playerid,87.1632); SetPlayerCameraPos(playerid, -2852.8296, -343.4230, 14.5014); SetPlayerCameraLookAt(playerid, -2860.4360, -342.8072, 14.2333); } case 1: { gTeam[playerid] = Army;
And for the 1700 score to be army, it shouldn't be on spawn. Check it under OnPlayerRequestSpawn instead;
Код:
if (GetPlayerScore(playerid) >= 1700) { //Let the player spawn... } else { // Send a message that they can't use this class... return 0; // return 0 so that they can't spawn after clicking the spawn button. }