[Ajuda] Bloqueio Comandos em Teleporte
#1

Pessoal seguinte, eu tenho um teleporte de arena /ak47

e tenho uns comandos de /arma1, /arma2, /colete, /vida etc

e queria que esses comandos fossem bloqueados no teleporte da arena, tem como?

Aqui o comando da arena

PHP код:
//----------------------AK 47----------------------//
if(strcmp(cmdtext"/ak47"true) == 0)
{
    if(
Arena[playerid] == 1) return SendClientMessage(playeridCOLOR_RED"ERRO: Vocк sу pode sair daqui apуs morrer ou digite /kill.!");
    
SetPlayerInterior(playerid,0);
    
Arena[playerid] = 1;
    new 
random(4);
    if (
== 0)//
    
{
    
SetPlayerPos(playerid, -1383.8594,501.4548,18.2344);
    }
    else if (
== 1)
    {
    
SetPlayerPos(playerid, -1516.1335,401.9359,42.3125);
    }
    else if (
== 2)
    {
    
SetPlayerPos(playerid, -1487.3669,333.2018,53.4587);
    }
    else if (
== 3)
    {
    
SetPlayerPos(playerid, -1488.2589,301.8719,61.3104);
    }
    new 
pname[MAX_PLAYER_NAME];
    
GetPlayerName(playeridpnameMAX_PLAYER_NAME);
    
format(stringsizeof(string), "[TELEPORTE]*** %s foi para Arena-AK47. (/ak47)"pname);
    
SendClientMessageToAll(COLOR_NOVOstring);
        
PlayerPlaySound(playerid1133257.6206, -41.53071002.0234);
        
ResetPlayerWeapons(playerid);
        
GivePlayerWeapon(playerid,30,5000);
        
SetPlayerArmour(playerid100);
        
GameTextForPlayer(playerid,"~r~MATE~n~TODOS!"30000);
    return 
1;
    }
//----------------------AK 47----------------------// 
Reply
#2

Adicione esta linha depois dos comandos:
pawn Код:
if(Arena[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "ERRO: Vocк sу pode sair daqui apуs morrer ou digite /kill.!");
Exemplo:
pawn Код:
if(strcmp(cmdtext, "/ak47", true) == 0)
{
    if(Arena[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "ERRO: Vocк sу pode sair daqui apуs morrer ou digite /kill.!");
    //RESTO DO CУDIGO
    return 1;
}
Reply
#3

Quote:
Originally Posted by GuiihCamargo
Посмотреть сообщение
Adicione esta linha depois dos comandos:
pawn Код:
if(Arena[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "ERRO: Vocк sу pode sair daqui apуs morrer ou digite /kill.!");
Exemplo:
pawn Код:
if(strcmp(cmdtext, "/ak47", true) == 0)
{
    if(Arena[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "ERRO: Vocк sу pode sair daqui apуs morrer ou digite /kill.!");
    //RESTO DO CУDIGO
    return 1;
}
Amigo mas jб esta desse jeito ??
Reply
#4

Й sу colocar.
pawn Код:
if(Arena[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "ERRO: Vocк nгo pode usar comando, pois esta em uma arena."); // Bloquear o comando caso ele esteja em uma arena.
Arena[playerid] = 1; // Adicione isto em todos os comandos que for uma "arena".
Nos comando que deseja ser bloqueado.
Reply
#5

Quote:
Originally Posted by DiiMeNoR
Посмотреть сообщение
Й sу colocar.
pawn Код:
if(Arena[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "ERRO: Vocк nгo pode usar comando, pois esta em uma arena."); // Bloquear o comando caso ele esteja em uma arena.
Arena[playerid] = 1; // Adicione isto em todos os comandos que for uma "arena".
Nos comando que deseja ser bloqueado.
Muito Obrigado!

Deu certo

Vlw novamente, sempre ajudando
Reply
#6

Quote:
Originally Posted by pan851
Посмотреть сообщение
Amigo mas jб esta desse jeito ??
Tipo, vocк coloca seu cmd, como:

pawn Код:
if(strcmp(cmdtext, "/COMANDO", true) == 0)
{
    if(Arena[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "ERRO: Vocк sу pode sair daqui apуs morrer ou digite /kill");
    Arena[playerid] = 1; // Adicione isto em todos os comandos que for uma "arena". By: DiiMeNoR
    //RESTO DO CУDIGO
    return 1;
}
---------------------------------------------------------------------

Quote:
Originally Posted by pan851
Посмотреть сообщение
Muito Obrigado!

Deu certo

Vlw novamente, sempre ajudando
PUTZ ¬¬'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)