05.07.2017, 16:21
Hey guys i want to create a vip chat i use luxadmin
Code
I want it in zcmd i tried alot but it doesn't work
Code
Код:
if(!IsPlayerVipType(playerid, 1))
if(!IsPlayerVipType(playerid, 1))
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; }
if(!IsPlayerVipType(playerid, 1))
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);
SendVIPMessage(COLOR_PURPLE, str);
}
else return SendClientMessage(playerid, 0xFF0000AA, "You are not VIP member.");
return 1;
}