- 0
Admin Chat
-
Similar Content
-
- 0 replies
- 354 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
marin1223
Am incercat sa fac un admin chat dar nu merge...
CMD:adminchat(playerid, params[])
{
new mesaj[128], string[128];
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_ERROR, "Nu esti admin.");
if(sscanf(params, "s[128]", mesaj)) return SendClientMessage(playerid, COLOR_SYN, "Foloseste: /adminchat <mesaj>");
{
if(PlayerInfo[playerid][pAdmin] > 1 && PlayerInfo[playerid][pAdmin] < 5)format(string, sizeof(string), "Admin %s[lv %d]: %s", GetName(playerid), PlayerInfo[playerid][pAdmin], mesaj);
AdminChat(COLOR_AC, string, 1);
}
return 1;
}
function AdminChat(color, mesaj[], lv)
{
foreach(new i : Player)
{
if(PlayerInfo[pAdmin] >= lv)
{
SendClientMessage(i, color, mesaj);
}
}
return 1;
}
2 answers to this question
Recommended Posts