VIP CHAT
#1

Hey guys i want to create a vip chat i use luxadmin

Code
Код:
if(!IsPlayerVipType(playerid, 1))
I want it in zcmd i tried alot but it doesn't work
Reply
#2

Show what you already did
Reply
#3

Nothing actually i tried but it doesn't work
Reply
#4

Quote:
Originally Posted by SeifGeny
Посмотреть сообщение
Nothing actually i tried but it doesn't work
Show what doesn't work... That's what this section is for... Posting code that doesn't work so others can help you with it.
Reply
#5

Код:
forward SendVIPMessage(color, string[]);
public SendVIPMessage(color, string[])
{
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
                if(IsPlayerConnected(i))
                {
                    if(IsPlayerVipMember(i))
                    {
                                SendClientMessage(i, color, string);
                        }
                }
        }
}

CMD:vc(playerid, params[])
{
        if(!IsPlayerVipType(playerid, 1))
    {
        new Nam[MAX_PLAYERS],message[128],str[256];
        if(sscanf(params,"s",message)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /vc(vip Chat) [Text]");
        GetPlayerName(playerid,Nam,sizeof(Nam));
        format(str,sizeof(str),"{9900CC}VIP Chat %s: {FFFFFF}%s",Nam,message);
        if(!IsPlayerVipType(playerid, 1))
                {
                        SendVIPMessage(COLOR_PURPLE, str);
                        return 1;
                }
        }
        else  return  SendClientMessage(playerid, 0xFF0000AA, "You are not VIP member.");
        return 1;
}
Reply
#6

Why
Код:
if(!IsPlayerVipType(playerid, 1))
twice?

You are also checking VIP type in the command, rather than VIP Member...
Reply
#7

So how i can fix it?
Reply
#8

PHP код:
forward SendVIPMessage(colorstring[]);
public 
SendVIPMessage(colorstring[])
{
        for(new 
0MAX_PLAYERSi++)
        {
                if(
IsPlayerConnected(i))
                {
                    if(
IsPlayerVipMember(i))
                    {
                                
SendClientMessage(icolorstring);
                        }
                }
        }
}
CMD:vc(playeridparams[])
{
        if(
IsPlayerVipType(playerid1))
    {
        new 
Nam[MAX_PLAYERS],message[128],str[256];
        if(
sscanf(params,"s",message)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /vc(vip Chat) [Text]");
        
GetPlayerName(playerid,Nam,sizeof(Nam));
        
format(str,sizeof(str),"{9900CC}VIP Chat %s: {FFFFFF}%s",Nam,message);
        
SendVIPMessage(COLOR_PURPLEstr);
    }
        else  return  
SendClientMessage(playerid0xFF0000AA"You are not VIP member.");
        return 
1;

Reply
#9

thank you so much +rep
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)