[Ajuda] Impedir Comandos por determinado Tempo
#1

Pessoal, eu fiz este code com Anti-Spawn Kill, Spawn no Aviгo e em 15 segundos ele й direcionado ao 'interior 0' (ou seja, fora do interior da aeronave) junto com um para-quedas.
Atй ai tudo bem, mas eu pensei que... se o player digitar um /teleporte ele iб sair imediatamente da aeronave e em 15 segundos ele й redirecionado ao interior 0 com o paraquedas, preciso de um SetTimer na OnPlayerCommandText q impeзa ele de digitar qualquer comando, se puderem me ajudar...

PHP код:
    //ANTI SPAWN KILL (10 seconds)
    
SetPlayerHealth(playerid, 10000.0); 
    
SendClientMessage(playerid, -1,"*********************************************************************") && SendClientMessage(playerid, -1,"[INFO]: Vocк estб no Modo Anti-Spawn Kill por 10 Segundos");
    
SetPlayerChatBubble(playerid, "Anti-Spawnkill", 0xFF0000AA, 100.0, 10000); 
    
SetTimerEx("AntiSpawnkill",10000,0,"i",playerid);  // 10 seconds
    //SPAWNS
    
new rand = random(sizeof(ServerSpawns));
    
SetPlayerInterior(playerid,9);
    
SetTimerEx("SetPInterior",15000,0,"i",playerid); // 15 seconds
    
SendClientMessage(playerid, -1,"*********************************************************************") && SendClientMessage(playerid, -1,"[INFO]: Em 15 Segundos vocк vai Aprender que 'Isto nгo й voar, й cair com estilo'") && SendClientMessage(playerid, -1,"*********************************************************************");
    
SetPlayerPos(playerid, ServerSpawns[rand][0], ServerSpawns[rand][1], ServerSpawns[rand][2]);
    
SetPlayerFacingAngle(playerid,ServerSpawns[rand][3]);
    
SetCameraBehindPlayer(playerid);
    return 
1;
}
forward AntiSpawnkill(playerid); 
public 
AntiSpawnkill(playerid) 
{ 
    
SetPlayerHealth(playerid, 100.0); 
    
SendClientMessage(playerid, -1, "[INFO]: Proteзгo Anti-Spawnkill Acabou, Agora Vocк estб por sua Conta"); 
    return 
1; 
}  
forward SetPInterior(playerid); 
public 
SetPInterior(playerid) 
{ 
    
SetPlayerInterior(playerid,0);
    
SendClientMessage(playerid, -1,"*********************************************************************") && SendClientMessage(playerid, -1, "[INFO]: Vocк ganhou um Para-Quedas, Boa Jornada!"); 
    
GivePlayerWeapon(playerid, 46, 1);
    return 
1; 
} 
Reply
#2

PHP код:
// Topo
new bool:bloquearComando [MAX_PLAYERS char]; // sv menor de 255 players
 
// Para Bloquear
bloquearComando[playerid] = true;
// Para Detectar Bloqueio
if (bloquearComando[playerid] == true) return SendClientMessage (playerid, -1, "Aguarde vocк nascer");
 
// Para Desbloquear
bloquearComando[playerid] = false; 
#LeiaMaisEm: https://sampforum.blast.hk/showthread.php?tid=557107
Reply
#3

Quote:
Originally Posted by JonathanFeitosa
Посмотреть сообщение
PHP код:
// Topo
new bool:bloquearComando [MAX_PLAYERS char]; // sv menor de 255 players
 
// Para Bloquear
bloquearComando[playerid] = true;
// Para Detectar Bloqueio
if (bloquearComando[playerid] == true) return SendClientMessage (playerid, -1, "Aguarde vocк nascer");
 
// Para Desbloquear
bloquearComando[playerid] = false; 
#LeiaMaisEm: https://sampforum.blast.hk/showthread.php?tid=557107
Obg Man =)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)