07.02.2011, 15:19
hi i made this code that supose to do teh chat like [omer5198]: TEXT [id:0 | Player] (or if the player is admin then Player>Admin...) but it doesn't write anything ingame... it just says the usual : omer5198: TEXT
so plz help...
b.t.w: sorry for my bad english.
code:
so plz help...
b.t.w: sorry for my bad english.
code:
PHP код:
public OnPlayerText(playerid, text[])
{
new chater[128], chat[128];
if(IsPlayerAdmin(playerid)){
format(chat, sizeof(chat), "[%s]: %d [id:%d | Admin]", chater, text, playerid);
}
else
{
GetPlayerName(playerid, chater, sizeof(chater));
format(chat, sizeof(chat), "[%s]: %d [id:%d | Player]", chater, text, playerid);
}
return 1;
}