16.01.2011, 02:45
Lust look ater some mistakes :P it colpile fine but when i do "/am hello" then the player who sent the message dont get the message, but the other admin does, Hope you understand it xD
And, LoL, im tierd now, i should be in bed for like 5 hours ago :O!
And, LoL, im tierd now, i should be in bed for like 5 hours ago :O!
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/am", cmdtext, true, 3) == 0)
{
new message[255];
strmid(message, cmdtext, 3, strlen(cmdtext));
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
for(new i; i < GetMaxPlayers(); i++)
{
if(IsPlayerAdmin(i))
{
format(string, sizeof(string), "ADMIN MESSAGE: %s(%d) %s",name, playerid, message);
SendClientMessage(i,0xFF0000FF,string);
return 1;
}
}
}
return 0;
}