message problem
#1

Why only me can type in vip chat this not working for other vip players

Код:
    if(text[0] == ADMCHATKEY && pInfo[playerid][pLevel] >= 1)
	{
		format(Jstring,sizeof(Jstring),"{FFEA00}|Admin Chat| %s: %s",GetName(playerid),text[1]);
		foreach(Player, i) if(pInfo[i][pLevel] >= 1) SendClientMessage(i,Admchat,Jstring);
		WriteToLog(Jstring,"AdminChat");
	    return 0;
	}
Код:
	if(text[0] == DONATORCHATKEY && pInfo[playerid][pLevel] >= 1)
	{
		format(Jstring,sizeof(Jstring),"{FFEA00}|VIP Chat| %s: %s",GetName(playerid),text[1]);
		foreach(Player, i) if(pInfo[i][Donator] >= 1) SendClientMessage(i,Admchat,Jstring);
		WriteToLog(Jstring,"VIPChatLog");
	    return 0;
	}
Reply
#2

Are you sure that the other players that tries to type in vip chat are "pInfo[playerid][pLevel] >= 1"?
Reply
#3

It's because you use admin variable as callback [pLevel], you should use vip variable, for example: [pDonateRank]

Код:
if(text[0] == DONATORCHATKEY && pInfo[playerid][pDonateRank] >= 1)
	{
		format(Jstring,sizeof(Jstring),"{FFEA00}|VIP Chat| %s: %s",GetName(playerid),text[1]);
		foreach(Player, i) if(pInfo[i][Donator] >= 1) SendClientMessage(i,Admchat,Jstring);
		WriteToLog(Jstring,"VIPChatLog");
	    return 0;
	}
Reply
#4

Try this.

pawn Код:
if(text[0] == ADMCHATKEY && pInfo[playerid][Donator] >= 1)
    {
        format(Jstring,sizeof(Jstring),"{FFEA00}|Admin Chat| %s: %s",GetName(playerid),text[1]);
        foreach(Player, i) if(pInfo[i][Donator] >= 1) SendClientMessage(i,Admchat,Jstring);
        WriteToLog(Jstring,"AdminChat");
        return 0;
    }
pawn Код:
if(text[0] == DONATORCHATKEY && pInfo[playerid][Donator] >= 1)
    {
        format(Jstring,sizeof(Jstring),"{FFEA00}|VIP Chat| %s: %s",GetName(playerid),text[1]);
        foreach(Player, i) if(pInfo[i][Donator] >= 1) SendClientMessage(i,Admchat,Jstring);
        WriteToLog(Jstring,"VIPChatLog");
        return 0;
    }
Reply
#5

Quote:
Originally Posted by MrAjusshi
Посмотреть сообщение
Try this.

pawn Код:
if(text[0] == ADMCHATKEY && pInfo[playerid][Donator] >= 1)
    {
        format(Jstring,sizeof(Jstring),"{FFEA00}|Admin Chat| %s: %s",GetName(playerid),text[1]);
        foreach(Player, i) if(pInfo[i][Donator] >= 1) SendClientMessage(i,Admchat,Jstring);
        WriteToLog(Jstring,"AdminChat");
        return 0;
    }
pawn Код:
if(text[0] == DONATORCHATKEY && pInfo[playerid][Donator] >= 1)
    {
        format(Jstring,sizeof(Jstring),"{FFEA00}|VIP Chat| %s: %s",GetName(playerid),text[1]);
        foreach(Player, i) if(pInfo[i][Donator] >= 1) SendClientMessage(i,Admchat,Jstring);
        WriteToLog(Jstring,"VIPChatLog");
        return 0;
    }
Are you serious guys? "pInfo[playerid][Donator]" variable does not exist in his script.

You can create a new variable with saving called "vip" or anything you want, And edit your code which is the vip chat to the new variable with saving which you created.

To get full help from me, Just post your enum and tell me which saving system you're using, Y_INI or SQLite or MySQL.
Reply
#6

Quote:
Originally Posted by Beryllium
Посмотреть сообщение
Are you serious guys? "pInfo[playerid][Donator]" variable does not exist in his script.

You can create a new variable with saving called "vip" or anything you want, And edit your code which is the vip chat to the new variable with saving which you created.

To get full help from me, Just post your enum and tell me which saving system you're using, Y_INI or SQLite or MySQL.
Код:
foreach(Player, i) if(pInfo[i][Donator] >= 1) SendClientMessage(i,Admchat,Jstring);
It's exist in his script. Don't try to comment something when you are still not sure.
Reply
#7

Quote:
Originally Posted by MrAjusshi
Посмотреть сообщение
Код:
foreach(Player, i) if(pInfo[i][Donator] >= 1) SendClientMessage(i,Admchat,Jstring);
It's exist in his script. Don't try to comment something when you are still not sure.
I can see something interesting...

Quote:
Originally Posted by MrAjusshi
Посмотреть сообщение
Try this.

if(text[0] == ADMCHATKEY && pInfo[playerid][Donator] >= 1)
That's from your quote, Isn't it?

So can the donators access the admin chat, Good Job!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)