Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <sscanf2>
- #include <streamer>
- #include <ZCMD>
- #include <foreach>
- //Skype: yZeCachuleta
- //=============================================================
- //DEFINES
- //=============================================================
- #define SCM SendClientMessage
- #define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- //COLORS
- #define RED "{FFFFFF}»"
- #define VER "{F81414}"
- #define GREEN "{37DB45}"
- #define WHITE 0xFFFFFF00
- //=============================================================
- //ENUM
- //=============================================================
- enum playerinfo
- {
- pClan,
- pLeader
- };
- new pInfo[MAX_PLAYERS][playerinfo];
- //========================================================================//
- //NEWS
- //========================================================================//
- new gate5;
- new bool:clan5stats=false;
- //========================================================================//
- //========================================================================//
- //========================================================================//
- main()
- {
- print("\n----------------------------------");
- print(" SISTEM BY JEFFERSON // MrOvelha");
- print(" SISTEM BY JEFFERSON // MrOvelha");
- print(" SISTEM BY JEFFERSON // MrOvelha");
- print(" SISTEM BY JEFFERSON // MrOvelha");
- print(" SISTEM BY JEFFERSON // MrOvelha");
- print(" SISTEM BY JEFFERSON // MrOvelha");
- print(" SISTEM BY JEFFERSON // MrOvelha");
- print(" SISTEM BY JEFFERSON // MrOvelha");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- SetWorldTime(14);
- Gates();
- Create3DTextLabel("Created By:\n{C3C3C3}Jefferson/ MrOvelha", 0x008080FF, 134.4645,-106.1480,1.4297, 20, 0, 0);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(PRESSED(KEY_CROUCH) && IsPlayerInAnyVehicle(playerid))
- {
- if(IsPlayerInRangeOfPoint(playerid, 7.0, -3.3517,-266.6953,5.4297))
- {
- if(pInfo[playerid][pClan] == 5)
- {
- if(clan5stats == false)
- {
- clan5stats = true;
- MoveObject(gate5, -3.2000000,-268.6000100,-1.0000000,1.5);
- SCM(playerid, -1, "* {37DB45}The gate was opened");
- }else{
- clan5stats = false;
- SCM(playerid, -1, "* {37DB45}The gate was closed ");
- MoveObject(gate5, -3.2000000,-268.6000100,7.2000000,1.5);
- }
- }
- }
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SetPlayerPos(playerid, 134.4645,-106.1480,1.4297);
- return 1;
- }
- //=========================================================================//
- //CAR TEST
- CMD:cv(playerid, params[])
- {
- new idveiculo, Float:Pos[3];
- if(sscanf(params, "d", idveiculo)) return SendClientMessage(playerid, -1, "{FF0000}ERRO: use /cv [id veiculo]");
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- CreateVehicle(idveiculo, Pos[0], Pos[1], Pos[2], 1515, 0, 6, 99999);
- GameTextForPlayer(playerid, "Veiculo Criado", 3000, 3);
- return 1;
- }
- //========================================================================//
- CMD:armas(playerid, params[])
- {
- GivePlayerWeapon(playerid,24,100);
- GivePlayerWeapon(playerid,28,100);
- GivePlayerWeapon(playerid,30,100);
- GivePlayerWeapon(playerid,29,100);
- return 1;
- }
- CMD:ogclan(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 7.0, -3.3517,-266.6953,5.4297))
- {
- if(pInfo[playerid][pClan] == 5)
- {
- if(clan5stats == false)
- {
- clan5stats = true;
- MoveObject(gate5, -3.2000000,-268.6000100,-1.0000000,1.5);
- SCM(playerid, -1, "* {37DB45}The gate was opened");
- }else{
- clan5stats = false;
- SCM(playerid, -1, "* {37DB45}The gate was closed ");
- MoveObject(gate5, -3.2000000,-268.6000100,7.2000000,1.5);
- }
- }
- }
- return 1;
- }
- CMD:c(playerid,params[])
- {
- new clanstring[128];
- if(pInfo[playerid][pClan])
- {
- if(!strlen(params))
- {
- SCM(playerid, -1, ""VER" /C [Message]");
- return 1;
- }
- format(clanstring, sizeof(clanstring), "{006400}[CLAN CHAT] %s[%d] says: {FFFFFF}%s", PlayerName(playerid), playerid, params);
- SendMessageToClan(playerid, clanstring, -1);
- }
- else {
- SCM(playerid,-1,"*"RED" You do not have the permissions.!");
- }
- return 1;
- }
- CMD:kickclan(playerid, params[])
- {
- if(pInfo[playerid][pLeader] > 0)
- {
- new targetid, string[128];
- if(sscanf(params, "u", targetid)) return SCM(playerid,-1,""VER" /clankick [playerid]");
- if(!IsPlayerConnected(targetid)) return SCM(playerid,-1,""VER" Player is not online");
- if(pInfo[playerid][pLeader] != pInfo[targetid][pClan]) return SCM(playerid, -1, "This member is not part of your clan");
- pInfo[targetid][pClan] = 0;
- SCM(playerid, -1, "You have been removed from the clan");
- format(string, sizeof(string), "Clan Leader %s has kicked %s from the clan", PlayerName(playerid), PlayerName(targetid));
- foreach(Player, i)
- {
- if(pInfo[i][pClan] == pInfo[playerid][pLeader])
- {
- SCM(i, -1, string);
- }
- }
- SCM(targetid,WHITE,string);
- }else{
- SCM(playerid, -1, "You don't have permissions ");
- }
- return 1;
- }
- CMD:inviteclan(playerid,params[])
- {
- if(pInfo[playerid][pLeader] > 0)
- {
- new targetid, string[128];
- if(sscanf(params, "u", targetid)) return SCM(playerid,-1,""RED" /inviteclan [playerid]");
- if(!IsPlayerConnected(targetid)) return SCM(playerid,-1,""RED" Player is not online");
- pInfo[targetid][pClan] = pInfo[playerid][pLeader];
- format(string, sizeof(string), "*"VER" %s have given clan status of to %s",PlayerName(playerid),PlayerName(targetid));
- SCM(targetid,WHITE,string);
- SendClientMessage(playerid, -1, "player tal ganhou tal tal tal");
- foreach(Player, i)
- {
- if(pInfo[i][pClan] == pInfo[playerid][pLeader])
- {
- SCM(i, -1, string);
- }
- }
- SCM(targetid,WHITE,string);
- }else{
- SCM(playerid, -1, "You don't have permissions ");
- }
- return 1;
- }
- CMD:cleave(playerid, params[])
- {
- pInfo[playerid][pClan] = 0;
- SCM(playerid, -1, ""VER"You have been leave from the clan");
- return 1;
- }
- CMD:membersclan(playerid, params[])
- {
- if(pInfo[playerid][pClan] > 0)
- {
- foreach(Player, i)
- {
- if(pInfo[i][pClan] == pInfo[playerid][pClan])
- {
- new string[128];
- format(string, sizeof(string), "%s {006400}[CLAN MEMBER].", PlayerName(i)),PlayerName(playerid);
- SCM(playerid, -1, string);
- }
- }
- }else{
- SCM(playerid, -1, "You don't have clan ");
- }
- return 1;
- }
- CMD:setleaderclan(playerid, params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new targetid,level,string[128];
- if(sscanf(params, "ud", targetid, level)) return SCM(playerid,-1,""VER" /setleader [playerid] [level]");
- if(!IsPlayerConnected(targetid)) return SCM(playerid,-1,""RED" Player is not online");
- if(level < 0 || level > 6) return SCM(playerid,-1,""RED" 0 None, 1 CLAN1, 2 CLAN2, 3 CLAN3 , 4 CLAN4, 5 CLAN5 6 CLAN6");
- SendClientMessage(playerid, -1, "player tal ganhou tal tal tal");
- pInfo[targetid][pClan] = level;
- pInfo[targetid][pLeader] = level;
- format(string, sizeof(string), "*"VER" %s have given clan leadership status of %d to %s",PlayerName(playerid),level,PlayerName(targetid));
- SCM(targetid,WHITE,string);
- }else{
- SCM(playerid, -1, ""RED" You can not use this command");
- }
- return 1;
- }
- CMD:setclan(playerid,params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new targetid,level,string[128];
- if(sscanf(params, "ud", targetid, level)) return SCM(playerid,-1,""RED" /setclan [playerid] [level]");
- if(!IsPlayerConnected(targetid)) return SCM(playerid,-1,""RED" Player is not online");
- if(level < 0 || level > 6) return SCM(playerid,-1,""RED" 0 None, 1 CLAN1, 2 CLAN2, 3 CLAN3 , 4 CLAN4, 5 CLAN5 6 CLAN6");
- SendClientMessage(playerid, -1, "player tal ganhou tal tal tal");
- pInfo[targetid][pClan] = level;
- format(string, sizeof(string), "*"VER" %s have given clan status of %d to %s",PlayerName(playerid),level,PlayerName(targetid));
- SCM(targetid,WHITE,string);
- }else{
- SCM(playerid, -1, ""RED" You can not use this command");
- }
- return 1;
- }
- CMD:skinclan(playerid, params[])
- {
- if(pInfo[playerid][pClan] > 0)
- {
- switch(pInfo[playerid][pClan])
- {
- case 1:
- {
- SetPlayerSkin(playerid, 101);
- }
- case 2:
- {
- SetPlayerSkin(playerid, 164);
- }
- case 3:
- {
- SetPlayerSkin(playerid, 123);
- }
- case 4:
- {
- SetPlayerSkin(playerid, 230);
- }
- case 5:
- {
- SetPlayerSkin(playerid, 283);
- }
- case 6:
- {
- SetPlayerSkin(playerid, 111);
- }
- }
- }
- else return SCM(playerid, -1, "ERROR: You are not part of a oficial clan. If you are, ask your leader for clan rights.");
- return 1;
- }
- CMD:cmdclan(playerid, params[])
- {
- if(pInfo[playerid][pClan]){
- SCM(playerid, -1, "{DC143C}» {006400}/c [Clan Chat]");
- SCM(playerid, -1, "{DC143C}» {006400}/kickclan [ONLY LEADER]");
- SCM(playerid, -1, "{DC143C}» {006400}/inviteclan [ONLY LEADER]");
- SCM(playerid, -1, "{DC143C}» {006400}/membersclan [Show Clan Members]");
- SCM(playerid, -1, "{DC143C}» {006400}/skinclan [Use The Skin Clan]");
- SCM(playerid, -1, "{DC143C}» {006400}/cleave [Leave from clan]");
- SCM(playerid, -1, "{DC143C}» {006400}/ogclan [Opens The Gate]");
- }else{
- SCM(playerid, -1, ""RED" You don't have permission");
- }
- return 1;
- }
- //==========================================================================//
- //STOCKS
- //==========================================================================//
- stock PlayerName(playerid)
- {
- new ppName[24];
- GetPlayerName(playerid, ppName, 24);
- return ppName;
- }
- stock GetName(playerid)
- {
- new Nameee[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nameee, sizeof(Nameee));
- return Nameee;
- }
- stock SendMessageToClan(playerid, message[], color)
- {
- foreach(Player, i)
- {
- if(pInfo[i][pClan] == pInfo[playerid][pClan])
- {
- SCM(i, color, message);
- }
- }
- return 1;
- }
- //==========================================================================//
- //MAPS
- //==========================================================================//
- stock Gates()
- {
- gate5 = CreateObject(980,-3.2000000,-268.6000100,7.2000000,0.0000000,0.0000000,182.0000000); //object(airportgate) (1)
- return 1;
- }
Add Comment
Please, Sign In to add comment