Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new VipTime[MAX_PLAYERS];
- new VipDate[MAX_PLAYERS];
- new VipInections[MAX_PLAYERS];
- //in loaded account
- if(VipTime[playerid] > 0 || VipInections[playerid] > 0)
- {
- new year,month,day;
- new countout = getdate(year,month,day);
- new left = VipTime[playerid]-countout;
- if(left <= 0)
- {
- SendClientMessage(playerid, -1, "Your VIP account has expired.");
- VipInections[playerid] = 0;
- VipTime[playerid] = 0;
- VipDate[playerid] = 0;
- }
- }
- if(VipInections[playerid] > 0)
- {
- SendClientMessage(playerid, -1,"Hello VIP player!");
- }
- //command
- CMD:setvip(playerid, params[])
- {
- //admin check
- if(sscanf(params,"ddd",params[0],params[1],params[2])) return SendClientMessage(playerid, -1, " Use: /setvip [id] [level vip] [days]");
- switch(params[1])
- {
- case 1: SendClientMessage(params[0], -1, "The administrator gave you Bronze VIP");
- case 2: SendClientMessage(params[0], -1, "The administrator gave you Silver VIP");
- case 3: SendClientMessage(params[0], -1, "The administrator gave you Gold VIP");
- default: SendClientMessage(params[0], -1, "The administrator took your VIP Account from you.");
- }
- if(params[2] == 0)
- {
- VipInections[params[0]] = 0;
- VipTime[params[0]] = 0;
- VipDate[params[0]] = 0;
- SendClientMessage(playerid, -1, "- You have taken VIP Status from a player.");
- }
- else
- {
- new Date[3];
- getdate(Date[0], Date[1], Date[2]);
- new countout = getdate(Date[0],Date[1],Date[2]);
- VipInections[params[0]] = params[1];
- VipTime[params[0]] = countout+params[2];
- VipDate[params[0]] = countout;
- SendClientMessage(playerid, -1, "- You have issued a VIP Status to the player.");
- }
- return 1;
- }
- //add to load n save account
- //VipInections[playerid]
- //VipTime[playerid]
- //VipDate[playerid]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement