06.03.2014, 00:39
Vocк vai precisar de uma include, chamada Foreach, procure no ****** que vocк achara .
Topo do GM
em OnPlayerCommandText
em OnPlayerText
Topo do GM
PHP код:
new vercmds[MAX_PLAYERS]= 0;
PHP код:
if (strcmp(cmdtext,"/vercmds", true)==0)
{
if(vercmds[playerid] == 0)
{
vercmds[playerid] = 1;
SendClientMessage(playerid, -1, " | INFO | Comando efetuado com sucesso!");
}
else if(vercmds[playerid] == 1)
{
vercmds[playerid] = 0;
SendClientMessage(playerid, 0x0016DDFF, "Agora vocк nao esta mais lendo os comandos do servidor!");
}
return 1;
}
PHP код:
foreach(Player, i)
{
if(vercmds[i] == 1)
{
new stringcmd[128];
new playa[MAX_PLAYER_NAME];
GetPlayerName(playerid, playa,MAX_PLAYER_NAME);
format(stringcmd, 128, " | INFO | O jogador %s (%d) digitou o comando ( %s ).", playa,playerid,cmdtext);
SendClientMessage(i,0x0016DDFF,stringcmd);
}
}