VIP chat - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: VIP chat (
/showthread.php?tid=190604)
VIP chat -
gychem - 15.11.2010
I want to make a chat only for VIPS,
but i don't know 100% how to make it.
Help me please.
I want that only VIPS van see this chat,
Код:
if(strcmp(cmd, "/vipchat", true) == 0 || strcmp(cmd, "/v", true) == 0)
{
if(PlayerInfo[playerid][pDonateRank] >= 1)
strmid(tmp,cmdtext,idx,strlen(cmdtext));
if(!strlen(tmp))
return SendClientMessage(playerid, COLOR_GRAD2, "You're not a VIP!");
format(string, sizeof(string), "[VIP] %s : %s",PlayerName(playerid),tmp);
SendClientMessage(playerid,COLOR_YELLOW,string);
for(new i = 0;i < MAX_PLAYERS;i++)
return 1;
}
Re: VIP chat -
willsuckformoney - 15.11.2010
pawn Код:
if(strcmp(cmd, "/vipchat", true) == 0 || strcmp(cmd, "/v", true) == 0)
{
if(PlayerInfo[playerid][pDonateRank] >= 1)
{
strmid(tmp,cmdtext,idx,strlen(cmdtext));
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /v(ipchat) [text]");
format(string, sizeof(string), "[VIP] %s : %s",PlayerName(playerid),tmp);
SendClientMessage(playerid,COLOR_YELLOW,string);
}
return 1;
}
From your code.
Re: VIP chat -
Rafa - 16.11.2010
hmm ok this but how to make that player has donated... ? :/
Re: VIP chat -
Ironboy500[TW] - 16.11.2010
You can just make /makedonator command for server owners.
Once command is entered place "PlayerInfo[playerid][pDonateRank] = 1;" under your script.
Re: VIP chat -
Rafa - 16.11.2010
hmm yeah but when he will reconnect the donator rights will be losed... :/
Re: VIP chat -
Mystique - 16.11.2010
Then you need to save it with a saving system such as Dini for example.
Re: VIP chat -
Rafa - 16.11.2010
need to create files for saving
Re: VIP chat -
Ironboy500[TW] - 16.11.2010
Do you got register/login system?
Re: VIP chat -
Rafa - 16.11.2010
hmmm yeah with gAdmin :/
Re: VIP chat -
Ironboy500[TW] - 16.11.2010
Good, take a look at OnPlayerDisconnect to see how gAdmin is saving accounts data. Just copy line where it saves Admin Level and replace parametars to VIP one. Hope you understand me.
if you got any more questions or need help let us know