how i make vip system?
#1

how i make a .inc so i can make my own commands for vip only? also, i wanted to make vip only commands.

like /setvip (for rcon only) and /vipclub (goes to vip club for vip only)

and it save in dudb user file.
Reply
#2

Command proccessor?
Reply
#3

Yeah, I thought it's the same as any other command you make?
Reply
#4

Using a command processor, and dudb? There are plenty of tutorials on using dudb, ****** it.
Reply
#5

I'm using ZCMD. thanks
Reply
#6

Im suggesting on you to use vip as a team , then you will have to use "SetPlayerTeam"

Link:: __@__
Reply
#7

here is the cmd::

Код:
CMD:setvip(playerid, params[])
{
	for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players
	{
		if(IsPlayerAdmin(i)) //Only Rcon Admin
		{
		    if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE:: /setvip [playername/id]");		    
		    new string[987], n[MAX_PLAYER_NAME], targerID;
		    GetPlayerName(playerid, n, sizeof(n));
		    new rank = 1>5;
		    format(string, sizeof(string), " Admin %s has set you vip level %s", n, rank);
                    SetPlayerTeam(playerid, VIP);
                    PlayerInfo[playerid][pVip] = rank; 
		    SendClientMessage(targerID, -1, string);
		    SendClientMessage(i, -1,string);
		    return 1;
		}
		else return SendClientMessage(playerid, -1, "You are not authorized to use that command!!");
	}
	return 1;
	
}
Note: Add
Код:
#define VIP 999
and in pInfo add the "pVip"
Reply
#8

Quote:
Originally Posted by Youice
Посмотреть сообщение
here is the cmd::

Код:
CMD:setvip(playerid, params[])
{
	for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players
	{
		if(IsPlayerAdmin(i)) //Only Rcon Admin
		{
		    if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE:: /setvip [playername/id]");		    
		    new string[987], n[MAX_PLAYER_NAME], targerID;
		    GetPlayerName(playerid, n, sizeof(n));
		    new rank = 1>5;
		    format(string, sizeof(string), " Admin %s has set you vip level %s", n, rank);
                    SetPlayerTeam(playerid, VIP);
                    PlayerInfo[playerid][pVip] = rank; 
		    SendClientMessage(targerID, -1, string);
		    SendClientMessage(i, -1,string);
		    return 1;
		}
		else return SendClientMessage(playerid, -1, "You are not authorized to use that command!!");
	}
	return 1;
	
}
Note: Add
Код:
#define VIP 999
and in pInfo add the "pVip"
thanks but how it save into dudb file and how i make other commands like /vipclub for vip only and if regular player want to go to /vipclub , it will say "you are no vip member!" i think i need .inc file.
Reply
#9

can somebody pls help? thank
Reply
#10

If this VIP system is used in a deathmatch/team deathmatch or any other kind of gamemode where you have to kill each other, I would suggest not to use SetPlayerTeam for a VIP system, because players on the same team can't kill each other. I would suggest reading this because it can help you a lot!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)