25.10.2010, 08:16
Untested but must work, just made in a minute.
If you need the sscanf stock, if you don't have it already, you can find it here. Just place it anywhere in your code
pawn Код:
if(strcmp(cmdtext,"/helpme",true) == 0)
{
new reason[128];
if(sscanf(params,"s",reason)) return SendClientMessage(playerid,COLOR_RED,"* Syntax Error: /helpme [reason]");
else
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i))
{
new Playername[MAX_PLAYER_NAME],string[128];
GetPlayerName(playerid,Playername,sizeof(Playername));
format(string,sizeof(string),"%s has requested help with the following reason: %s",Playername,reason);
SendClientMessage(i,0x55FF00FF,string); // Green
}
}
}
}
return 1;
}