Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- #
- # # ###### System by
- # # # # # HavingGood
- # # # ######
- ### # #
- -----------------------------------------
- # # ### ###
- # # # # # #
- ## # # # #
- -------------------------------
- ' Do not remove the author ;) '
- -------------------------------
- */
- //---include---
- #include <a_samp>
- #include <sscanf2>
- #include <zcmd>
- //---define---
- #define FILTERSCRIPT
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xFF0000AA
- #define COLOR_YELLOW 0xFFFF00AA
- //---new---
- new bool:vip[MAX_PLAYERS];
- CMD:givevip(playerid,cmdtext[]){
- new player;
- if(strcmp(PlayerName(playerid), "Admin1", false) != 0 && strcmp(PlayerName(playerid), "Admin2", false) != 0 && strcmp(PlayerName(playerid), "Admin3", false) != 0)
- return SendClientMessage(playerid,COLOR_RED, "You can not use this command!"); //Command on nickname
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_YELLOW,"You're not the administrator");
- if(sscanf(cmdtext,"u",player)){
- SendClientMessage(playerid, -1, "Use: /givevip [player id]");
- return 1;
- }
- return Activevip(player);}
- CMD:delvip(playerid,cmdtext[]){
- new player;
- if(strcmp(PlayerName(playerid), "Admin1", false) != 0 && strcmp(PlayerName(playerid), "Admin2", false) != 0 && strcmp(PlayerName(playerid), "Admin3", false) != 0)
- return SendClientMessage(playerid,COLOR_RED, "You can not use this command!"); //Command on nickname
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_YELLOW,"You're not the administrator");
- if(sscanf(cmdtext,"u",player)){
- SendClientMessage(playerid, -1, "Use: /delvip [player id]");
- return 1;
- }
- return Deactivevip(player);}
- CMD:vipme(playerid, params[]){
- if(vip[playerid]) SendClientMessage(playerid, COLOR_YELLOW,"You are vip!");
- else SendClientMessage(playerid, COLOR_YELLOW, "You are not vip!");
- return 1;}
- CMD:vheal(playerid, params[]){ //A typical vip command (Health)
- if(!vip[playerid]) SendClientMessage(playerid, COLOR_RED, "You are not vip!");
- SetPlayerHealth(playerid, 100);
- return 1;}
- CMD:varmour(playerid, params[]){ //A typical vip command2 (Armor)
- if(!vip[playerid]) SendClientMessage(playerid, COLOR_RED, "You are not vip!");
- SetPlayerArmour(playerid, 100);
- return 1;}
- CMD:vnight(playerid, params[]){
- if(!vip[playerid]) SendClientMessage(playerid, COLOR_RED, "You are not vip!");
- new time;
- SetPlayerTime(playerid,time,0);
- return 1;}
- CMD:vday(playerid, params[]){
- if(!vip[playerid]) SendClientMessage(playerid, COLOR_RED, "You are not vip!");
- new time;
- SetPlayerTime(playerid,time,12);
- return 1;}
- CMD:vch(playerid, params[]){ //Vip chat
- new tmp[256];
- new string[256];
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_RED, "Use: /vch [text]");
- return 1;
- }
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name, sizeof(name));
- if(IsPlayerAdmin(playerid)){
- format(string, sizeof(string), "*Vip %s: %s",name, tmp);
- SendMessageTovip(COLOR_YELLOW, string);
- }
- return 1;}
- CMD:about(playerid, params[]){ //Don't delete
- if(!vip[playerid]) SendClientMessage(playerid, COLOR_RED, "You are not vip!");
- new about[1000];
- strcat(about, "{CCFF99}The script was created by HavingGood\n");
- strcat(about, "{99FF99}Creation date: 19.12.12y\n");
- strcat(about, "{66FF66}Version: 1.1\n");
- strcat(about, "{FF6633}Merry Christmas!\n");
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "About",about , "Ok", "");
- return 1;}
- CMD:vcmd(playerid, params[]){ //Don't delete
- if(!vip[playerid]) SendClientMessage(playerid, COLOR_RED, "You are not vip!");
- new vcmd[1000];
- strcat(vcmd, "{FFFFFF}Vip Commands\n");
- strcat(vcmd, "{FFFFFF}Admin Commands:\n");
- strcat(vcmd, " \n");
- strcat(vcmd, "{FF0000}/givevip [player id] - You give Vip\n");
- strcat(vcmd, "{FF0000}/delvip [player id] - You delete Vip\n");
- strcat(vcmd, " \n");
- strcat(vcmd, "{FF0000}Users Commands:\n");
- strcat(vcmd, " \n");
- strcat(vcmd, "{FF0000}/about - information about the script\n");
- strcat(vcmd, "{FF0000}/vipme - You check whether you have a VIP account\n");
- strcat(vcmd, "{FF0000}/vheal - Vip Heal\n");
- strcat(vcmd, "{FF0000}/varmour - Vip armour\n");
- strcat(vcmd, "{FF0000}/vnight - Change the weather\n");
- strcat(vcmd, "{FF0000}/vday - Change the weather\n");
- strcat(vcmd, "{FF0000}/vch [text] - VipChat\n");
- ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "VIP COMMANDS",vcmd , "Ok", "");
- return 1;}
- forward Activevip(playerid);
- public Activevip(playerid){
- if(vip[playerid]) return 0;
- vip[playerid]=true;
- SendClientMessage(playerid, COLOR_GREEN, "You received a vip account!");
- return 1;}
- forward Deactivevip(playerid);
- public Deactivevip(playerid){
- if(vip[playerid]) return 0;
- vip[playerid]=false;
- SendClientMessage(playerid, COLOR_GREEN, "Yours vip account has been deleted!");
- return 1;}
- stock SendMessageTovip(color, const message[]) {
- for(new a=0; a<GetMaxPlayers(); a++) {
- if(IsPlayerConnected(a)) {
- if(vip[a]) {
- SendClientMessage(a, color, message);
- }
- }
- }
- }
- stock PlayerName(playerid)
- {
- new Name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
- return Name;
- }
Advertisement
Add Comment
Please, Sign In to add comment