Nгo entendi o 500...
pawn Код:
new bool:tem [ MAX_PLAYERS ] ;
no meu GM eu fiz desse jeito....
embaixo das #includes <a_samp> etc...
botei
pawn Код:
new bool:tem [ MAX_PLAYERS ] ;
No meu comando de minigun (DeathMatch)
pawn Код:
if(strcmp(cmdtext,"/minigun",true)==0)
{
tem [ playerid ] = true ; ///Add esta linha
SetPlayerPos(playerid,3295.3445,-1710.3306,13.3872);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,38,9999999);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"Minigun!",4000,6);
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "[DeathMatch]: %s Foi para o DeathMatch (/minigun)", pname);
SendClientMessageToAll(0x33AA33AA, string);
return true; //Coloque true;
}
Comando que deseja bloquear :
pawn Код:
if(strcmp(cmdtext, "/vidaecolete", true) == 0)
{
if ( tem [ playerid ] == true ) ///ADD ANTES
return SendClientMessage ( playerid , -1 , "Vocк nгo pode usar comandos em uma Arena Deathmatch. Use /sairdm para sair da arena" ) ; //ADD ANTES
SetPlayerArmour(playerid, 100);
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid,0xFFFFFFFF,"Vocк ganhou Vida e Colete");
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s Ganhou vida e colete (/todopoderoso)", pname);
SendClientMessageToAll(0x00F400AA, string);
SetPlayerAttachedObject(playerid,1,19142,1,0.1,0.05,0.0,0.0,0.0,0.0);
SetPlayerAttachedObject(playerid,2,19141,2,0.11,0.0,0.0,0.0,0.0,0.0);
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
}
return true; ///retire 1; e adicione o true;
}
Comando para sair do DeathMatch...
pawn Код:
if ( strcmp ( cmdtext , "/sairdm" , true ) == 0 )
{
if ( tem [ playerid ] == false )
return SendClientMessage ( playerid , -1 , "Vocк nгo estб em uma arena" ) ;
tem [ playerid ] = false ;
SpawnPlayer ( playerid ) ;
return true ;
}
Assim funcioonou aqui...