13/12/2023 11:28
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:current;
current = GetPlayerMenu(playerid);
if(current == profissoes)
{
switch(row)
{
case 0: // Honestas
{
HideMenuForPlayer(profissoes, playerid);
ShowMenuForPlayer(honestas, playerid);
TogglePlayerControllable(playerid, 0);
Bit1_Set(escudo,playerid,0);
}
case 1: // Honestas 1
{
HideMenuForPlayer(profissoes, playerid);
ShowMenuForPlayer(honestas1, playerid);
TogglePlayerControllable(playerid, 0);
Bit1_Set(escudo,playerid,0);
}
case 2: // Honestas 2
{
HideMenuForPlayer(profissoes, playerid);
ShowMenuForPlayer(honestas2, playerid);
TogglePlayerControllable(playerid, 0);
Bit1_Set(escudo,playerid,0);
}
case 3: // desonestas
{
HideMenuForPlayer(profissoes, playerid);
ShowMenuForPlayer(desonestas, playerid);
TogglePlayerControllable(playerid, 0);
Bit1_Set(escudo,playerid,0);
}
case 4: // policia
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
if(PlayerInfo[playerid][pPunidop]> 0){
SendClientMessage(playerid,Vermelho," | ERRO | Você esta punido e nao pode acessar este menu!");
TogglePlayerControllable(playerid, 1);
HideMenuForPlayer(profissoes, playerid);
return 1;
}
HideMenuForPlayer(profissoes, playerid);
ShowMenuForPlayer(policia, playerid);
TogglePlayerControllable(playerid, 0);
return 1;
}
/*case 5: // exercitoo
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
if(PlayerInfo[playerid][pPunidop]> 0){
SendClientMessage(playerid,Vermelho," | ERRO | Você esta punido e nao pode acessar este menu!");
TogglePlayerControllable(playerid, 1);
HideMenuForPlayer(profissoes, playerid);
return 1;
}
HideMenuForPlayer(profissoes, playerid);
ShowMenuForPlayer(exercitoo, playerid);
TogglePlayerControllable(playerid, 0);
}
case 6: // outraas
{
HideMenuForPlayer(profissoes, playerid);
ShowMenuForPlayer(outraas, playerid);
TogglePlayerControllable(playerid, 0);
}*/
case 7: // Cancelar
{
TogglePlayerControllable(playerid, 1);
}
}
}
{
new Menu:current;
current = GetPlayerMenu(playerid);
if(current == profissoes)
{
switch(row)
{
case 0: // Honestas
{
HideMenuForPlayer(profissoes, playerid);
ShowMenuForPlayer(honestas, playerid);
TogglePlayerControllable(playerid, 0);
Bit1_Set(escudo,playerid,0);
}
case 1: // Honestas 1
{
HideMenuForPlayer(profissoes, playerid);
ShowMenuForPlayer(honestas1, playerid);
TogglePlayerControllable(playerid, 0);
Bit1_Set(escudo,playerid,0);
}
case 2: // Honestas 2
{
HideMenuForPlayer(profissoes, playerid);
ShowMenuForPlayer(honestas2, playerid);
TogglePlayerControllable(playerid, 0);
Bit1_Set(escudo,playerid,0);
}
case 3: // desonestas
{
HideMenuForPlayer(profissoes, playerid);
ShowMenuForPlayer(desonestas, playerid);
TogglePlayerControllable(playerid, 0);
Bit1_Set(escudo,playerid,0);
}
case 4: // policia
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
if(PlayerInfo[playerid][pPunidop]> 0){
SendClientMessage(playerid,Vermelho," | ERRO | Você esta punido e nao pode acessar este menu!");
TogglePlayerControllable(playerid, 1);
HideMenuForPlayer(profissoes, playerid);
return 1;
}
HideMenuForPlayer(profissoes, playerid);
ShowMenuForPlayer(policia, playerid);
TogglePlayerControllable(playerid, 0);
return 1;
}
/*case 5: // exercitoo
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
if(PlayerInfo[playerid][pPunidop]> 0){
SendClientMessage(playerid,Vermelho," | ERRO | Você esta punido e nao pode acessar este menu!");
TogglePlayerControllable(playerid, 1);
HideMenuForPlayer(profissoes, playerid);
return 1;
}
HideMenuForPlayer(profissoes, playerid);
ShowMenuForPlayer(exercitoo, playerid);
TogglePlayerControllable(playerid, 0);
}
case 6: // outraas
{
HideMenuForPlayer(profissoes, playerid);
ShowMenuForPlayer(outraas, playerid);
TogglePlayerControllable(playerid, 0);
}*/
case 7: // Cancelar
{
TogglePlayerControllable(playerid, 1);
}
}
}