pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new command[32],params[96];
if (strfind(cmdtext, " ", false) != -1)
{
strmid(command, cmdtext, 0, strfind(cmdtext, " ", false));
strmid(params, cmdtext, strfind(cmdtext, " ", false), strlen(cmdtext));
}
if (strcmp(command, "//", true) == 0)
{
new AdminName[MAX_PLAYER_NAME], AdminText[128];
GetPlayerName(playerid,AdminName,sizeof(AdminName));
format(AdminText,sizeof(AdminText),"%s: %s",AdminName,params);
SendClientMessageToAdmins(0xA954FFFF,AdminText);
return 1;
}
return 0;
}
Here you go mate. The first "if" finds the space between the command and the parameters (/command parameters). The second if is your command ( // [text] ). What this does is send everything the player types after //[space] to the admins.
Just add everything in your OnPlayerCommandText(playerid, cmdtext[]) and it should work.