Posts: 70
Threads: 1
Joined: May 2017
Are you sure that the other players that tries to type in vip chat are "pInfo[playerid][pLevel] >= 1"?
Posts: 58
Threads: 0
Joined: May 2017
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;
}
Posts: 60
Threads: 8
Joined: Jun 2017
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;
}
Posts: 70
Threads: 1
Joined: May 2017
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.
Posts: 60
Threads: 8
Joined: Jun 2017
02.07.2017, 04:15
(
Последний раз редактировалось MrAjusshi; 02.07.2017 в 05:18.
)
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.
Posts: 70
Threads: 1
Joined: May 2017
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!