VIP chat
#1

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;
	}
Reply
#2

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.
Reply
#3

hmm ok this but how to make that player has donated... ? :/
Reply
#4

You can just make /makedonator command for server owners.
Once command is entered place "PlayerInfo[playerid][pDonateRank] = 1;" under your script.
Reply
#5

hmm yeah but when he will reconnect the donator rights will be losed... :/
Reply
#6

Then you need to save it with a saving system such as Dini for example.
Reply
#7

need to create files for saving
Reply
#8

Do you got register/login system?
Reply
#9

hmmm yeah with gAdmin :/
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)