Quote:
Originally Posted by Biess
I need little help in my admin chat
pawn Код:
stock SendMessageToAdmins(text[]) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerAdmin(i)) { SendClientMessage(i, blue, text); } } }
pawn Код:
public OnPlayerText(playerid, text[]) { if(IsPlayerAdmin(playerid) && text[0] == '.') { new msg[128], pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, MAX_PLAYER_NAME); format(msg, sizeof(msg), "[ADMIN CHAT] %s (ID %d): %s", pName, playerid, text[1]); SendMessageToAdmins(msg); return 0; }
But i can't get it to work for my own admin variable
pawn Код:
if(PInfo[playerid][Level] < 1)
Could someone fix this?
|
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PInfo[i][Level] > 1)
{
pawn Код:
public OnPlayerText(playerid, text[])
{
if(PInfo[playerid][Level] > 1 && text[0] == '.')
I'd recommend to start learning basic variables.