Poll

Do you like the [VIP-SYSTEM] ??

yeah is great
1 (25%)
not is bad
0 (0%)
is the best Vip System
2 (50%)
Give more commands please
1 (25%)

Total Members Voted: 3

Voting closed: March 15, 2013, 03:41:14 pm

Author Topic: The real Vip System  (Read 4871 times)

0 Members and 1 Guest are viewing this topic.

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
The real Vip System
« on: March 05, 2013, 07:54:03 am »
This commands work in all script whit register system only you need change the name of the folder in public getviplevel and setviplevel

[pawn]new MSN[256];[/pawn]


[pawn]//=========================Vip System for Vips players===========================================
public GetVipLevel(playerid)
{
    format(MSN,256, USERS_FILE, gPlayers[playerid]);
   new Vip; Vip = dini_Int(MSN,"Vip");
   return Vip;
}
public SetVipLevel(playerid,Vip)
{
    format(MSN,256, USERS_FILE, gPlayers[playerid]);
   dini_IntSet(MSN,"Vip",Vip);
}
//==============================================================================[/pawn]
[pawn]public VipLevel(Vip)
{
   new vip[256];
    if (Vip == 0) vip = "Not is a Vip";
    if (Vip == 1) vip = "Bronze Vip";
    if (Vip == 2) vip = "Silver Vip";
    if (Vip == 3) vip = "Gold Vip";
    else if (Vip >= 4) vip = "Premium Vip";
   return vip;
}[/pawn]

Need create a new value in configuration, commands, example setvip=10

 [pawn]          else if (strcmp(cmd, "setvip", true) == 0)
     {
     new level[256];
      tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp), level = strtok(cmdtext, idx);
  if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, 0xF0182DFF, "Not Have Acces to use this command" );
      if (!strlen(tmp)) SendClientMessage(playerid, 0xFFFF00AA,"[System]: /c SetVip [Name] [1/2/3/4]" );
      else {
          if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid, 0xF0182DFF,"[Error] - Unknown Player.");
           else if (!IsNumeric(level)) SendClientMessage(playerid, 0xFFFF00AA,"[Error] -Invalid Vip Level.");
           else {
                       format( szMsg, sizeof( szMsg ), "Admin %s give vip level to: %s, of: [%s].",gPlayers[playerid],gPlayers[plr],VipLevel(strval(level)));
            SendClientMessageToAll( 0xFFFF00AA, szMsg);
                SetVipLevel(plr,strval(level));
              }
      }
      return 1;
    }[/pawn]

In OnplayerSpawn put this

[pawn]   format( szMsg, sizeof( szMsg ), " [%s] Is spawned Vip Level: [%s].",gPlayers[playerid],VipLevel(GetVipLevel(playerid)));
   SendClientMessageToAll(0xFFFF00AA, szMsg );[/pawn]

And one idea to make a vip commands

  [pawn]      else if (strcmp(cmd, "jail", true) == 0) {
new razon[256];
        tmp = strtok( cmdtext, idx ), razon = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( tmp );
      if ( !IsLoggedIn( playerid ) ) SendClientMessage(playerid, 0xF0182DFF, "Login in you account" );
        else if ( !strlen(razon) ) SendClientMessage(playerid, 0xF0182DFF, "Write: /c jail [Nick/ID] [Reason]" );
         else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage(playerid, 0xF0182DFF, "Error: Jugador desconocido" );
        else
         {
            if(GetVipLevel(playerid)>= 1)
      {

         format( szMsg, sizeof( szMsg ), "[Vip %s] send to jail:[ %s ] Reason:[ %s ]", gPlayers[ playerid ], gPlayers[ plr ], cmdtext[ strlen( tmp ) +8 ] );
         SendClientMessageToAll(  0xF0182DFF, szMsg );
       SetPlayerPos(plr,393.5389,-505.2466,9.3956,0,0);
       TogglePlayerControllable( plr, 0 );
         ToggleWidescreenForPlayer(plr,1);
         ToggleGreenScanlinesForPlayer(plr,1);
         
       }
       else SendClientMessage(playerid,ROJO,"Not is a vip");
      }
      return 1;
   }[/pawn]

This is a real, nice and simple commands whit not errors

Take my idea, but give me thanks first
« Last Edit: March 05, 2013, 07:23:51 pm by aledark24 »
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline JaVeD

  • Street Thug
  • *
  • Posts: 46
  • Want scripts? Pm me now! Just for $
    • View Profile
    • Free Host -> Clicky
Re: The real Vip System
« Reply #1 on: March 05, 2013, 08:56:58 am »
GOOD COMMANDS + NO BUGS GREAT
SA:MP Server: 5.231.49.21:7777
Website: www.nse-server.com

Offline [KB]ViceMania

  • Wiseguy
  • **
  • Posts: 53
  • Mega War server administrator
    • View Profile
Re: The real Vip System
« Reply #2 on: March 05, 2013, 09:40:39 am »
good work :) :P

Offline Doom

  • Made Man
  • ***
  • Posts: 105
    • View Profile
Re: The real Vip System
« Reply #3 on: March 05, 2013, 04:48:27 pm »
Yeah is great...  ;)

Offline .ElBoyz

  • Street Thug
  • *
  • Posts: 15
  • ¿ What's up doc ?
    • View Profile
Re: The real Vip System
« Reply #4 on: March 17, 2013, 11:02:07 pm »
Command Good

Offline Fire_Head

  • Street Thug
  • *
  • Posts: 35
    • View Profile
Re: The real Vip System
« Reply #5 on: March 18, 2013, 12:25:22 am »
Gud Command and Its work 100%