if(PRESSED(KEY_JUMP)) // LSHIFT
{
if(IsPlayerChoosingClass[playerid] == 1)
{
if(ClassChoosingStep[playerid] == 0) // ASSAULT
{
gClass[playerid] = ASSAULT;
}
if(ClassChoosingStep[playerid] == 1) // MEDIC
{
if(Rank(playerid) >= 2) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!");
gClass[playerid] = MEDIC;
}
if(ClassChoosingStep[playerid] == 2) // ANTI-TANK
{
if(Rank(playerid) >= 3) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!");
gClass[playerid] = ANTI-TANK;
}
if(ClassChoosingStep[playerid] == 3) // ENGINEER
{
if(Rank(playerid) >= 4) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!");
gClass[playerid] = ENGINEER;
}
if(ClassChoosingStep[playerid] == 4) // AIRFORCE
{
if(Rank(playerid) >= 5) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!");
gClass[playerid] = AIRFORCE;
}
if(ClassChoosingStep[playerid] == 5) // SPECICAL-OPS
{
if(Rank(playerid) >= 6) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!");
gClass[playerid] = SPEC-OPS;
}
if(PRESSED(KEY_JUMP)) // LSHIFT { if(IsPlayerChoosingClass[playerid] == 1) { if(ClassChoosingStep[playerid] == 0) // ASSAULT { gClass[playerid] = ASSAULT; } if(ClassChoosingStep[playerid] == 1) // MEDIC { if(Rank(playerid) < 2) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!"); gClass[playerid] = MEDIC; } if(ClassChoosingStep[playerid] == 2) // ANTI-TANK { if(Rank(playerid) < 3) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!"); gClass[playerid] = ANTI-TANK; } if(ClassChoosingStep[playerid] == 3) // ENGINEER { if(Rank(playerid) < 4) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!"); gClass[playerid] = ENGINEER; } if(ClassChoosingStep[playerid] == 4) // AIRFORCE { if(Rank(playerid) < 5) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!"); gClass[playerid] = AIRFORCE; } if(ClassChoosingStep[playerid] == 5) // SPECICAL-OPS { if(Rank(playerid) < 6) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!"); gClass[playerid] = SPEC-OPS; }
Here you go
Код:
if(PRESSED(KEY_JUMP)) // LSHIFT { if(IsPlayerChoosingClass[playerid] == 1) { if(ClassChoosingStep[playerid] == 0) // ASSAULT { gClass[playerid] = ASSAULT; } if(ClassChoosingStep[playerid] == 1) // MEDIC { if(Rank(playerid) < 2) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!"); gClass[playerid] = MEDIC; } if(ClassChoosingStep[playerid] == 2) // ANTI-TANK { if(Rank(playerid) < 3) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!"); gClass[playerid] = ANTI-TANK; } if(ClassChoosingStep[playerid] == 3) // ENGINEER { if(Rank(playerid) < 4) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!"); gClass[playerid] = ENGINEER; } if(ClassChoosingStep[playerid] == 4) // AIRFORCE { if(Rank(playerid) < 5) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!"); gClass[playerid] = AIRFORCE; } if(ClassChoosingStep[playerid] == 5) // SPECICAL-OPS { if(Rank(playerid) < 6) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!"); gClass[playerid] = SPEC-OPS; } |