Commands
#9

pawn Код:
//On top of script:
new bool:EnabledCmds[MAX_PLAYERS];

//Already given, just modify little:
new str[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(str, sizeof(str), "%s (%d) just typed: %s", pName,playerid,cmdtext);
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i) && EnabledCmds[i])
    {
        SendClientMessage(i, -1, str);
    }
}

//In your /message command: (Single command to turn on-off)
if(!EnabledCmds[playerid])
{ EnabledCmds[playerid] = true; SendClientMessage(playerid, 0x00FF00FF, "Enabled..."); }
else
{ EnabledCmds[playerid] = false; SendClientMessage(playerid, 0xFF0000FF, "Disabled..."); }
Reply


Messages In This Thread
Commands - by Alex_Obando - 08.08.2011, 18:54
Re: Commands - by Unknown_Killer - 08.08.2011, 19:01
Re: Commands - by UnknownKilla2 - 08.08.2011, 19:03
Respuesta: Commands - by Alex_Obando - 08.08.2011, 19:04
Re: Commands - by HyperZ - 08.08.2011, 19:06
Re: Respuesta: Commands - by UnknownKilla2 - 08.08.2011, 19:13
Re: Respuesta: Commands - by Jay. - 08.08.2011, 19:14
Respuesta: Re: Commands - by Alex_Obando - 08.08.2011, 19:16
Re: Commands - by iPLEOMAX - 08.08.2011, 19:37
Re: Commands - by Unknown_Killer - 08.08.2011, 19:40
Respuesta: Commands - by Alex_Obando - 08.08.2011, 19:49

Forum Jump:


Users browsing this thread: 2 Guest(s)