12.09.2009, 12:19
Why are you using strtok inside dcmd ? dcmd was made for you to not use slow and unefficient strtok
pawn Код:
dcmd_say(playerid,params[])
{
if(IsPlayerAdmin(playerid))
{
if(!strlen(params))
{
SendClientMessage(playerid,COLOR_GREY,"|| Usage: /say (text) ||");
SendClientMessage(playerid,COLOR_GREY,"|| Function: Announces a adminґs text global. ||");
return true;
}
new pname2[MAX_PLAYER_NAME], string[256];
GetPlayerName(playerid, pname2, sizeof(pname2));
format(string, sizeof(string), "|| Administrator %s: %s ||", pname2, params);
SendClientMessageToAll(COLOR_ORANGE, string);
return true;
}
else return SendClientMessage(playerid, COLOR_RED, "[!] You are not logged into RCON.");
}