SA-MP Forums Archive
VIP - 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: VIP (/showthread.php?tid=387133)



VIP - Red_Dragon. - 23.10.2012

I need to make temp vip i have my own vip system but not temporarily vip are 3 types and the 3 types when i give it to any player the player receives a permanent vip but i want to make one ? what should i create ? variables ? stocks ? or what
and thanks


Re: VIP - RLGaming - 23.10.2012

I did in my old GM

'new TempVIP[playerid];

then making them a tempVIP

pawn Код:
CMD:maketemp(playerid, params[])
{
      if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, -1, "usage: /maketemp [playerid]");
 
      if(IsPlayerConnected(giveplayerid))
      {
             TempVIP[giveplayerid] = 1;
      }
return 1;
}
Made it really quick, but you should get how it works


Re: VIP - Dizzle - 23.10.2012

Try doing this.

On top of your script.


Код:
new tempvip1[MAX_PLAYERS]; // for type 1
new tempvip2[MAX_PLAYERS]; // for type 2
new tempvip3[MAX_PLAYERS]; // for type 3
Then copy your old vip commands and change their names to w/e you want to (/settempvip [playerid] [type]) and put this inside.

Код:
if(tempvip1[playerid] != 0) return SendClientMessage(playerid, red, "This player is already vip type one");
(tempvip1[playerid] = 1); // setting the player temporarily vip status 1
and on

OnPlayerConnect - add this

Код:
(tempvip1[playerid] = 0);
(tempvip2[playerid] = 0);
(tempvip3[playerid] = 0); // reseting the player's vip level if he disconnect/connect again
Hope I helped you.