SA-MP Forums Archive
How To Make VIP System ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How To Make VIP System ? (/showthread.php?tid=505555)



How To Make VIP System ? - WhiteAngels - 09.04.2014

How To Make VIP System with Dini And CMD:makevip with zcmd ??

I Need it...




~SorryForMyLittleEnglish


Re: How To Make VIP System ? - [IND]Crazy - 09.04.2014

same like you crete admin system .


Re: How To Make VIP System ? - WhiteAngels - 11.04.2014

Quote:
Originally Posted by [IND]Crazy
Посмотреть сообщение
same like you crete admin system .
I can't.I'm using L Admin 4


Re: How To Make VIP System ? - BroZeus - 11.04.2014

find a system which u like from here http://id-samp.blogspot.in/2012/04/t...-includes.html


Re: How To Make VIP System ? - Skidraw - 11.04.2014

If you want to make a Vip system i will recommend you to make with <zcmd> it is useful and if u want /makevip command here is the pawn code:
Код:
CMD:makevip(playerid, params[])
{
   if(IsPlayerAdmin(playerid))
   {
	  new string[125], level, player1;
	  if(sscanf(params,"dd",player1, level)) return SendClientMessage(playerid, RED,"[USAGE]: /setvip ( playerid ) ( level )");
	  if(!IsPlayerConnected(playerid) && player1 != INVALID_PLAYER_ID)
	  {
		 SendClientMessage(playerid, RED,"[ERROR]: Player is not connected");
	  }
	  if(level > MAX_VIPL)
	  {
		 SendClientMessage(playerid, RED,"[ERROR]: Incorrect level");
	  }
	  else
	  {
	     format(string, sizeof(string),""cblue"Administrator "cgreen"'%s' "cblue"has set your vip level to "cgreen"'%d'", PlayerName(playerid),level);
	     SendClientMessage(player1, PURPLE, string);
	     PlayerPlaySound(player1,1057,0.0,0.0,0.0);
	     PlayerInfo[player1][pVIP] = level;
	  }
   }
   else return SendClientMessage(playerid, RED,"[ERROR]: You need to be RCON admin to use this command");
   return 1;
}



Re: How To Make VIP System ? - ChandraLouis - 11.04.2014

Try this
pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf>
#include <foreach>

#define DIALOG_VIPS 1

enum PlayerInfo
{
    pDonors
}

new pInfo[MAX_PLAYERS][PlayerInfo];

stock Name(playerid)
{
    new name[128];
    GetPlayerName(playerid, name, 128);
    return name;
}

stock VIPName(playerid)
{
    new vipname[128];
    switch(pInfo[playerid][pDonors])
    {
        case 0: vipname= "Normal";
        case 1: vipname= "V.I.P";
        case 2: vipname= "Silver V.I.P";
        case 3: vipname= "Gold V.I.P";
    }
    return vipname;
}
CMD:setdonor(playerid,params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new id, level, n[MAX_PLAYER_NAME], str[128];
        if (sscanf(params, "dd", id, level)) return SendClientMessage(playerid, COLOR_GREEN, "{FF0000}[Set-Donators]: {FFFFFF}/setdonor <ID> <Level>");
        if (!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREEN, "{FF0000}[Set]: {FFFFFF}You have entered an incorrect ID");
        if(level < 1 || level > 3) return SendClientMessage(playerid, COLOR_RED, "{FF0000}[Set]: {FFFFFF}Max Donator Level is 3 !");
        GetPlayerName(id, n, MAX_PLAYER_NAME);
        pInfo[id][pDonors] = level;
        format(str, 128, "[ADMIN] You have set %s's Donator level to %d", n, level);
        SendClientMessage(playerid, COLOR_GREEN, str);
        format(str, 128, "[ADMIN] Admin %s has your Donator level to %d", playerid, level);
        SendClientMessage(id, COLOR_GREEN, str);
        return 1;
    }
    else return SendClientMessage(playerid,-1,"{FF0000}[ADMIN] You're not RCON Staff!");
}
CMD:donors(playerid,params[])
{
    new string3[128];
    foreach(Player, i)
    {
        if(pInfo[i][pDonors]>1)
        {
            format(string3,sizeof(string3),""cgreen"Name : %s | Level : %d | Position : %s",Name(playerid), PlayerInfo[i][pDonors], VIPName(playerid));
            SPD(playerid, 1, DIALOG_STYLE_MSGBOX, "Donators Online", string3, "Ok", "Close");
        }
    }
    return 1;
}