12.12.2011, 21:30
Quote:
Could someone make a /say command for me please, even with the public OnPlayerCommandText(playerid, cmdtext[]) bit on it, just everything on it so when I compile it, it will 100% work. I'm not being lazy lol it's one of the simplest thing to make but the simplest things bug the shit out of me because I find it's harder to fix
![]() Anyways, thanks so much for any help I get. Stivs. PS Say = Light Red text sent to the whole server with 'Admin: (text here)' |
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/say", true) == 0)
{
if(!IsPlayerAdmin(playerid))
return 0;
if((cmdtext[4] != ' ') || (cmdtext[5] == 0))
return SendClientMessage(playerid, 0xAFAFAFFF, "Usage:{FFFFFF} /say [text]");
new
str[135];
format(str, sizeof(str), "Admin: %s", cmdtext[4]);
return SendClientMessageToAll(0xFF6347FF, str); // light red
}
return 0;
}