Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- #
- # # ###### System by
- # # # # # HavingGood
- # # # ######
- ### # #
- */
- //---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: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:varmor(playerid, params[]) //A typical vip command2 (Armor)
- {
- if(!vip[playerid]) SendClientMessage(playerid, COLOR_RED, "You are not vip!");
- SetPlayerArmour(playerid, 100);
- 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;
- }
- 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