SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 05/07/2017, 05:21 PM   #1
SeifGeny
Little Clucker
 
Join Date: May 2016
Location: Hell
Posts: 42
Reputation: 0
Default VIP CHAT

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

Code
Code:
if(!IsPlayerVipType(playerid, 1))
I want it in zcmd i tried alot but it doesn't work
SeifGeny is offline   Reply With Quote
Old 05/07/2017, 05:37 PM   #2
Dayrion
High-roller
 
Dayrion's Avatar
 
Join Date: Jan 2016
Location: France
Posts: 1,920
Reputation: 258
Default Re: VIP CHAT

Show what you already did
__________________
actor_plus - v5.0.2
I'm a goner, somebody catch my breath,
I'm a goner, somebody catch my breath
Dayrion is offline   Reply With Quote
Old 05/07/2017, 05:40 PM   #3
SeifGeny
Little Clucker
 
Join Date: May 2016
Location: Hell
Posts: 42
Reputation: 0
Default Re: VIP CHAT

Nothing actually i tried but it doesn't work
SeifGeny is offline   Reply With Quote
Old 05/07/2017, 06:07 PM   #4
Sew_Sumi
Banned
 
Join Date: Jun 2008
Location: Azerbaijan
Posts: 6,268
Reputation: 525
Default Re: VIP CHAT

Quote:
Originally Posted by SeifGeny View Post
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.
Sew_Sumi is offline   Reply With Quote
Old 05/07/2017, 06:09 PM   #5
SeifGeny
Little Clucker
 
Join Date: May 2016
Location: Hell
Posts: 42
Reputation: 0
Default Re: VIP CHAT

Code:
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;
}
SeifGeny is offline   Reply With Quote
Old 05/07/2017, 06:11 PM   #6
Sew_Sumi
Banned
 
Join Date: Jun 2008
Location: Azerbaijan
Posts: 6,268
Reputation: 525
Default Re: VIP CHAT

Why
Code:
if(!IsPlayerVipType(playerid, 1))
twice?

You are also checking VIP type in the command, rather than VIP Member...
Sew_Sumi is offline   Reply With Quote
Old 05/07/2017, 06:15 PM   #7
SeifGeny
Little Clucker
 
Join Date: May 2016
Location: Hell
Posts: 42
Reputation: 0
Default Re: VIP CHAT

So how i can fix it?
SeifGeny is offline   Reply With Quote
Old 05/07/2017, 07:20 PM   #8
RxErT
Huge Clucker
 
Join Date: May 2016
Location: SA:MP Lemon
Posts: 246
Reputation: 12
Default Re: VIP CHAT

PHP Code:
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;

RxErT is offline   Reply With Quote
Old 05/07/2017, 08:39 PM   #9
SeifGeny
Little Clucker
 
Join Date: May 2016
Location: Hell
Posts: 42
Reputation: 0
Default Re: VIP CHAT

thank you so much +rep
SeifGeny is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] RECS - Raf's External Chat System - Chat from your Android phone ! R@f Filterscripts 71 26/05/2017 06:28 PM
[FilterScript] Shrewd Chat System V2 (With Smart Chat V3) [Good for Roleplay] =WoR=Varth Filterscripts 24 13/03/2017 01:24 PM
admin chat and advisor chat avaible without /aduty /cduty Acres Scripting Help 2 09/01/2015 02:13 PM
Admin Chat < Admins can't see chat or my text, but I can see their chat Andy_McKinley Help Archive 37 17/05/2011 09:26 PM


All times are GMT. The time now is 12:09 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.