dcmd_vercmds(playerid, params[])
{
#pragma unused params
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(i)){
new stringcmd[256];
new playa[MAX_PLAYER_NAME];
GetPlayerName(playerid, playa,MAX_PLAYER_NAME);
format(stringcmd, 256, "O jogador %s Id:%d Digitou o Comando: %s", playa,playerid,cmdtext);
SendClientMessage(i,0xFFFFFFAA, stringcmd);
}
}
return 1;
}
D:\Documents and Settings\HOME-PC\Meus documentos\server-teste\gamemodes\adrenaline.pwn(2183) : error 017: undefined symbol "cmdtext"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
dcmd_vercmds(playerid, params[])
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(i)){
new stringcmd[256];
new playa[MAX_PLAYER_NAME];
GetPlayerName(playerid, playa,MAX_PLAYER_NAME);
format(stringcmd, 256, "O jogador %s Id:%d Digitou o Comando: %s", playa,playerid,params);
SendClientMessage(i,0xFFFFFFAA, stringcmd);
}
}
return 1;
}
dcmd_vercmds(playerid, params[])
{
#pragma unused params
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Vocк nгo й admin.");
for(new i=0; i<MAX_PLAYERS; i++)
{
new stringcmd[256];
new playa[MAX_PLAYER_NAME];
GetPlayerName(playerid, playa,MAX_PLAYER_NAME);
format(stringcmd, 256, "O jogador %s Id:%d Digitou o Comando: /vercmds", playa,playerid);
SendClientMessage(i,0xFFFFFFAA, stringcmd);
}
return 1;
}
tente assim
pawn Код:
|
// Topo:
new bool: Read = false;
// Na public: OnPlayerCommandPerformed(playerid, cmdtext[], success) caso nao tiver crie uma.
if(Read)
{
new strcmd[128], pl[24]; GetPlayerName(playerid, pl, 24);
for(new i, e = GetMaxPlayers(); i != e; ++i)
{
if(IsPlayerAdmin(i))
{
format(strcmd, sizeof(strcmd), "O jogador %s Id:%d Digitou o Comando: /vercmds", playa,playerid);
SendClientMessage(i, -1, strcmd);
}
}
}
// qualquer lugar do gm
dcmd_vercmds(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"No es ademir");
if(Read) SendClientMessage(playerid, -1,"VER COMANDOS: Deslgiado");
if(!Read) SendClientMessage(playerid, -1,"VER COMANDOS: Ligado");
Read = !Read;
return true;
}