Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //==================================Hi All====================================//
- //===============This is a simple gamemode scripted by SHE790=================//
- //=========================Thanks For Downloading=============================//
- //=============================So Lets Start==================================//
- //============================================================================//
- //============================================================================//
- //===============================[Includes]===================================//
- //============================================================================//
- #include <a_samp>
- #include <YSI\y_ini>
- #include <zcmd>
- #include <foreach>
- #include <sscanf2>
- #include <streamer>
- //============================================================================//
- //================================[Teams]=====================================//
- //============================================================================//
- #define Grove 1
- #define Ballas 2
- #define Vagos 3
- #define Aztecas 4
- //============================================================================//
- //===============================[Colors]=====================================//
- //============================================================================//
- #define GroveColor 0x90EE90FF
- #define BallasColor 0xFFC0CBAA
- #define VagosColor 0xFFFF00FF
- #define AztecasColor 0x00FFFFFF
- #define LIGHTBLUE 0x00FFFFFF
- #define Red 0xFF0000FF
- #define WHITE 0xFFFFFFFF
- #define PINK 0xFF80FFFF
- #define Orange 0xFF8000FF
- //============================================================================//
- //============================[Dialogs and Enum]==============================//
- //============================================================================//
- #define SCM SendClientMessage
- #define DIALOG_REGISTER 1
- #define DIALOG_LOGIN 2
- #define PATH "Accounts/%s.ini"//Create a folder at your script files names Accounts
- enum pInfo
- {
- pPass,
- pCash,
- pAdmin,
- pKills,
- pSkin,
- pDeaths,
- pLogged,
- pScore,
- pBanned
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- forward TimerForRemoveObj(playerid);
- new HitObjTime[MAX_PLAYERS];
- forward save_timer(playerid);
- new RedScreenTime[MAX_PLAYERS];
- new AdvTime[MAX_PLAYERS];
- new GroveVeh[20];
- new BallasVeh[20];
- new VagosVeh[20];
- new AztecasVeh[20];
- new Gang[MAX_PLAYERS];
- forward LoadUser_data(playerid,name[],value[]);
- new randomMessages[][] =
- {
- "[SERVER] Use /help to see all availbe commands",
- "[SERVER] Dont Forget to read /rules",
- "[SERVER] This GameMode is Scripted by SHE790"
- };
- forward RandomMessages();
- forward KickLog(string[]);
- forward BanLog(string[]);
- new apm = 0;
- //============================================================================//
- //================================[Stocks]====================================//
- //============================================================================//
- stock IsAGroveCar(carid)
- {
- for(new v = 0; v < sizeof(GroveVeh); v++)
- {
- if(carid == GroveVeh[v]) return 1;
- }
- return 0;
- }
- stock IsABallasCar(carid)
- {
- for(new v = 0; v < sizeof(BallasVeh); v++)
- {
- if(carid == BallasVeh[v]) return 1;
- }
- return 0;
- }
- stock IsAAztecasCar(carid)
- {
- for(new v = 0; v < sizeof(AztecasVeh); v++)
- {
- if(carid == AztecasVeh[v]) return 1;
- }
- return 0;
- }
- stock IsAVagosCar(carid)
- {
- for(new v = 0; v < sizeof(VagosVeh); v++)
- {
- if(carid == VagosVeh[v]) return 1;
- }
- return 0;
- }
- stock SendAdminMessage(text[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(PlayerInfo[i][pAdmin]>=1)
- {
- SendClientMessage(i,-1,text);
- }
- }
- return true;
- }
- stock GetName(playerid)
- {
- new name[24];
- GetPlayerName(playerid, name, 24);
- return name;
- }
- stock sendername(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- for(new i = 0; i < MAX_PLAYER_NAME; i++)
- {
- if(name[i] == '_') name[i] = ' ';
- }
- return name;
- }
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- stock udb_hash(buf[]) {
- new length=strlen(buf);
- new s1 = 1;
- new s2 = 0;
- new n;
- for (n=0; n<length; n++)
- {
- s1 = (s1 + buf[n]) % 65521;
- s2 = (s2 + s1) % 65521;
- }
- return (s2 << 16) + s1;
- }
- //============================================================================//
- //===============================[Publics]====================================//
- //============================================================================//
- new PlayerTotalKills[MAX_PLAYERS] = 0;
- public OnFilterScriptInit()
- {
- print(" LS Gang Wars Scripted By SHE790");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- main()
- {
- print(" LS Gang Wars Scripted By SHE790");
- }
- public OnGameModeInit()
- {
- SetGameModeText("Gang Wars");
- SetTimer("[Server]", 60000, true);
- UsePlayerPedAnims( );
- DisableInteriorEnterExits();
- ShowPlayerMarkers( 0 );
- ShowNameTags( 1 );
- AllowAdminTeleport( 1 );
- AddPlayerClass(107,2498.4844,-1643.2212,13.7826,177.4201,24,1000,27,1000,16,1000); // Grove
- AddPlayerClass(102,2157.4907,-1708.4534,15.0859,359.4762,24,1000,27,1000,16,1000); // Ballas
- AddPlayerClass(108,2373.7385,-1140.9768,28.4875,180.9356,24,1000,27,1000,16,1000); // Vagos
- AddPlayerClass(115,1675.1875,-2121.0498,13.5469,313.4387,24,1000,27,1000,16,1000); // Aztecas
- //Grove
- GroveVeh[0] =AddStaticVehicleEx(412,2508.2393,-1671.7756,13.2177,347.2553,137,137,100); // Grove
- GroveVeh[1] =AddStaticVehicleEx(412,2497.5012,-1655.6753,13.2261,81.8963,137,137,100); // Grove
- GroveVeh[2] =AddStaticVehicleEx(412,2498.3628,-1682.1313,13.1994,101.8438,137,137,100); // Grove
- GroveVeh[3] =AddStaticVehicleEx(468,2506.5999,-1660.9631,13.0868,31.8633,137,137,100); // Grove
- GroveVeh[4] =AddStaticVehicleEx(468,2483.4285,-1654.7098,12.9793,94.5025,137,137,100); // Grove
- GroveVeh[5] =AddStaticVehicleEx(468,2483.7700,-1683.8999,13.0923,78.5948,137,137,100); // Grove
- //Ballas
- BallasVeh[0] =AddStaticVehicleEx(468,2200.2395,-1675.1848,13.9413,346.5051,147,147,100); // Ballas
- BallasVeh[1] =AddStaticVehicleEx(517,2187.2253,-1669.5668,14.3136,346.5294,147,147,100); // Ballas
- BallasVeh[2] =AddStaticVehicleEx(517,2185.3005,-1678.7198,13.8870,346.3020,147,147,100); // Ballas
- BallasVeh[3] =AddStaticVehicleEx(517,2183.6599,-1688.4922,13.5069,351.4986,147,147,100); // Ballas
- BallasVeh[4] =AddStaticVehicleEx(517,2189.0186,-1659.4565,14.7839,347.0395,147,147,100); // Ballas
- BallasVeh[5] =AddStaticVehicleEx(566,2194.6216,-1671.6973,14.2908,345.6134,147,147,100); // Ballas
- BallasVeh[6] =AddStaticVehicleEx(566,2196.6353,-1660.9783,14.7388,349.4670,147,147,100); // Ballas
- BallasVeh[7] =AddStaticVehicleEx(566,2192.5881,-1679.1763,13.8549,346.5743,147,147,100); // Ballas
- BallasVeh[8] =AddStaticVehicleEx(566,2190.7188,-1687.8025,13.4751,348.8312,147,147,100); // Ballas
- BallasVeh[9] =AddStaticVehicleEx(468,2202.2573,-1669.1936,14.1311,343.9594,147,147,100); // Ballas
- BallasVeh[10] =AddStaticVehicleEx(468,2204.3901,-1659.8114,14.3785,343.0818,147,147,100); // Ballas
- BallasVeh[11] =AddStaticVehicleEx(468,2198.9473,-1683.8168,13.6615,348.8855,147,147,100); // Ballas
- BallasVeh[12] =AddStaticVehicleEx(468,2198.0110,-1691.3538,13.4698,352.6253,147,147,100); // Ballas
- //Vagos
- VagosVeh[0] =AddStaticVehicleEx(468,2359.7688,-1149.9063,27.0886,98.6411,194,194,100); // Vagos
- VagosVeh[1] =AddStaticVehicleEx(468,2367.9280,-1149.3313,27.1143,91.0150,194,194,100); // Vagos
- VagosVeh[2] =AddStaticVehicleEx(468,2376.2778,-1149.4939,27.1145,88.1634,194,194,100); // Vagos
- VagosVeh[3] =AddStaticVehicleEx(468,2382.2590,-1149.3517,27.2547,90.7258,194,194,100); // Vagos
- VagosVeh[4] =AddStaticVehicleEx(468,2390.3179,-1149.2836,28.1058,90.7143,194,194,100); // Vagos
- VagosVeh[5] =AddStaticVehicleEx(468,2360.2288,-1158.7572,27.0978,87.9899,194,194,100); // Vagos
- VagosVeh[6] =AddStaticVehicleEx(468,2383.2271,-1158.7882,27.3482,85.7300,194,194,100); // Vagos
- VagosVeh[7] =AddStaticVehicleEx(474,2353.0935,-1151.0057,27.0248,93.0219,194,194,100); // Vagos
- VagosVeh[8] =AddStaticVehicleEx(474,2367.2463,-1166.6875,27.1869,184.0016,194,194,100); // Vagos
- VagosVeh[9] =AddStaticVehicleEx(474,2375.8801,-1161.5858,27.2459,170.6727,194,194,100); // Vagos
- //Aztecas
- AztecasVeh[0] =AddStaticVehicleEx(534,1683.7639,-2108.8086,13.1074,268.6805,246,246,100); // Aztecas
- AztecasVeh[1] =AddStaticVehicleEx(534,1684.1537,-2116.3472,13.1743,273.1353,246,246,100); // Aztecas
- AztecasVeh[2] =AddStaticVehicleEx(534,1692.8679,-2108.9844,13.1069,267.6172,246,246,100); // Aztecas
- AztecasVeh[3] =AddStaticVehicleEx(534,1692.7073,-2116.1497,13.1091,270.2408,246,246,100); // Aztecas
- AztecasVeh[4] =AddStaticVehicleEx(575,1701.3755,-2115.8735,12.9861,269.9332,246,246,100); // Aztecas
- AztecasVeh[5] =AddStaticVehicleEx(575,1700.1849,-2108.9976,12.9843,271.3449,246,246,100); // Aztecas
- AztecasVeh[6] =AddStaticVehicleEx(468,1704.8351,-2108.9812,13.0520,271.2786,246,246,100); // Aztecas
- AztecasVeh[7] =AddStaticVehicleEx(468,1705.4651,-2115.7566,13.0519,271.7458,246,246,100); // Aztecas
- AztecasVeh[8] =AddStaticVehicleEx(468,1681.9119,-2112.7720,13.1349,268.4475,246,246,100); // Aztecas
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public KickLog(string[])
- {
- new entry[256];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("Logs/kick.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public BanLog(string[])
- {
- new entry[256];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("Logs/ban.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public OnPlayerConnect(playerid)
- {
- if(fexist(UserPath(playerid)))
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Account Login","Type your password below to login.","Login","Quit");
- }
- else
- {
- new string[125];
- format(string,sizeof(string),"Hello %s.\nYou're not registered please register.",sendername(playerid));
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Account Register",string,"Register","Later");
- }
- HitObjTime[playerid] = 0;
- RedScreenTime[playerid] = 0;
- AdvTime[playerid] = 0;
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch( dialogid )
- {
- case DIALOG_REGISTER:
- {
- if (!response) return Kick(playerid);
- if(response)
- {
- if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Account Registeration","You've entered an invalid password./nType a password below to join the community.","Register","Leave");
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Password",udb_hash(inputtext));
- INI_WriteInt(File,"Cash",0);
- INI_WriteInt(File,"Admin",0);
- INI_WriteInt(File,"Kills",0);
- INI_WriteInt(File,"Deaths",0);
- INI_WriteInt(File,"Score",1);
- INI_Close(File);
- }
- }
- case DIALOG_LOGIN:
- {
- if (!response) return Kick (playerid);
- if(response)
- {
- if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
- SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);
- SCM(playerid,VagosColor,"You have successfully logged in, {FFFFFF}Welcome!");
- PlayerInfo[playerid][pLogged] = 1;
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Account Login","You have entered an invalid password.\nType your password below to login.","Login","Quit");
- }
- return 1;
- }
- }
- }
- return 1;
- }
- public LoadUser_data(playerid,name[],value[])
- {
- INI_Int("Password",PlayerInfo[playerid][pPass]);
- INI_Int("Cash",PlayerInfo[playerid][pCash]);
- INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
- INI_Int("Kills",PlayerInfo[playerid][pKills]);
- INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
- INI_Int("pBanned",PlayerInfo[playerid][pBanned]);
- INI_Int("Score",PlayerInfo[playerid][pScore]);
- return 1;
- }
- public save_timer(playerid)
- {
- if(PlayerInfo[playerid][pLogged] == 1)
- {
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
- INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
- INI_WriteInt(File,"pBanned",PlayerInfo[playerid][pBanned]);
- INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
- INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
- INI_WriteInt(File,"Score",GetPlayerScore(playerid));
- INI_Close(File);
- }
- return 1;
- }
- public OnPlayerCommandPerformed(playerid, cmdtext[], success)
- {
- if(!success)SendClientMessage(playerid, -1, "This command does not exists use /help to see available commands");
- return 1;
- }
- public RandomMessages()
- {
- new randomMsg = random(sizeof(randomMessages));
- SendClientMessageToAll(BallasColor, randomMessages[randomMsg]);
- }
- public OnPlayerSpawn(playerid)
- {
- if(GetPlayerTeam(playerid) == Grove)
- {
- SetPlayerColor(playerid, GroveColor);
- GameTextForPlayer(playerid, "~g~Your Part of Grove Family", 3000, 3);
- GivePlayerWeapon(playerid, 24, 1000);
- GivePlayerWeapon(playerid, 27, 1000);
- GivePlayerWeapon(playerid, 16, 1000);
- }
- else if(GetPlayerTeam(playerid) == Ballas)
- {
- SetPlayerColor(playerid, BallasColor);
- GameTextForPlayer(playerid, "~r~Your Part of Ballas Family", 3000, 3);
- GivePlayerWeapon(playerid, 24, 1000);
- GivePlayerWeapon(playerid, 27, 1000);
- GivePlayerWeapon(playerid, 16, 1000);
- }
- else if(GetPlayerTeam(playerid) == Vagos)
- {
- SetPlayerColor(playerid, VagosColor);
- GameTextForPlayer(playerid, "~r~Your Part of Vagos Family", 3000, 3);
- GivePlayerWeapon(playerid, 24, 1000);
- GivePlayerWeapon(playerid, 27, 1000);
- GivePlayerWeapon(playerid, 16, 1000);
- }
- else if(GetPlayerTeam(playerid) == Aztecas)
- {
- SetPlayerColor(playerid, AztecasColor);
- GameTextForPlayer(playerid, "~r~Your Part of Aztecas Family", 3000, 3);
- GivePlayerWeapon(playerid, 24, 1000);
- GivePlayerWeapon(playerid, 27, 1000);
- GivePlayerWeapon(playerid, 16, 1000);
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- PlayerInfo[killerid][pKills]++;
- PlayerInfo[playerid][pDeaths]++;
- SendDeathMessage(killerid, playerid, reason);
- if(killerid != INVALID_PLAYER_ID)
- {
- SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
- GivePlayerMoney(killerid, 5000);
- GameTextForPlayer(killerid, "~W~Nice~Y~Shot !~n~~R~Got $5000 & 1 Score", 3000, 1);
- }
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid,1588.5428,-1370.3191,330.0635);
- SetPlayerCameraPos(playerid, 1558.5428,-1370.3191,330.0635);
- SetPlayerCameraLookAt(playerid, 1558.5428,-1370.3191,330.0635);
- switch(classid)
- {
- case 0:
- {
- SetPlayerTeam(playerid, Grove);
- GameTextForPlayer(playerid, "~g~Grove Gang", 3000, 3);
- }
- case 1:
- {
- SetPlayerTeam(playerid, Ballas);
- GameTextForPlayer(playerid, "~b~Ballas Gang", 3000, 3);
- }
- case 2:
- {
- SetPlayerTeam(playerid, Vagos);
- GameTextForPlayer(playerid, "~y~Vagos Gang", 3000, 3);
- }
- case 3:
- {
- SetPlayerTeam(playerid, Aztecas);
- GameTextForPlayer(playerid, "~lb~Aztecas Gang", 3000, 3);
- }
- }
- new Name[128],string[126],killerid;
- GetPlayerName(killerid, Name, sizeof(Name));
- PlayerTotalKills[killerid]++;
- PlayerTotalKills[playerid] = 0;
- if(PlayerTotalKills[killerid] == 1) {
- PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/firstblood.mp3");
- format(string, sizeof(string), "~r~%s FIRST BLOOD", Name);
- GameTextForAll(string, 6000,3);
- }
- if(PlayerTotalKills[killerid] == 2) {
- PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/doublekill.mp3");
- format(string, sizeof(string), "~r~%s DOUBLE KILL.", Name);
- GameTextForAll(string, 6000,3);
- return 1;
- }
- if(PlayerTotalKills[killerid] == 3) {
- PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/killingspree.mp3");
- format(string, sizeof(string), "~r~%s TRIPLE KILL", Name);
- GameTextForAll(string, 6000,3);
- return 1;
- }
- if(PlayerTotalKills[killerid] == 4) {
- PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/dominating.mp3");
- format(string, sizeof(string), "~r~%s IS DOMINATING", Name);
- GameTextForAll(string, 6000,3);
- return 1;
- }
- if(PlayerTotalKills[killerid] == 5) {
- PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/triplekill.mp3");
- format(string, sizeof(string), "~r~%s KILLING SPREE", Name);
- GameTextForAll(string, 6000,3);
- return 1;
- }
- if(PlayerTotalKills[killerid] == 7) {
- PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/monsterkill.mp3");
- format(string, sizeof(string), "~r~%s MONSTER KILL", Name);
- GameTextForAll(string, 6000,3);
- return 1;
- }
- if(PlayerTotalKills[killerid] == 9) {
- PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/wickedsick.mp3");
- format(string, sizeof(string), "~r~%s WICKED SICK", Name);
- GameTextForAll(string, 6000,3);
- return 1;
- }
- if(PlayerTotalKills[killerid] == 11) {
- PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/ludicrouskill.mp3");
- format(string, sizeof(string), "~r~%s LUDICROUS KILL", Name);
- GameTextForAll(string, 6000,3);
- return 1;
- }
- if(PlayerTotalKills[killerid] == 13) {
- PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/ultrakill.mp3");
- format(string, sizeof(string), "~r~%s ULTRA KILL", Name);
- GameTextForAll(string, 6000,3);
- return 1;
- }
- if(PlayerTotalKills[killerid] == 15) {
- PlayAudioStreamForPlayer(killerid, "http://www.pamp3.site40.net/quake/unstoppable.mp3");
- format(string, sizeof(string), "~r~%s IS UNSTOPPABLE", Name);
- GameTextForAll(string, 6000,3);
- return 1;
- }
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(IsAGroveCar(vehicleid))
- {
- if(Gang[playerid] != 1)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- SetPlayerPos(playerid, x, y, z+0.5);
- SendClientMessage(playerid, -1, "You are not part of the Grove Family.");
- }
- else
- {
- return 1;
- }
- }
- if(IsABallasCar(vehicleid))
- {
- if(Gang[playerid] != 2)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- SetPlayerPos(playerid, x, y, z+0.5);
- SendClientMessage(playerid, -1, "You are not part of The Ballas.");
- }
- else
- {
- return 1;
- }
- }
- if(IsAAztecasCar(vehicleid))
- {
- if(Gang[playerid] != 3)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- SetPlayerPos(playerid, x, y, z+0.5);
- SendClientMessage(playerid, -1, "You are not part of the Los Aztecas.");
- }
- else
- {
- return 1;
- }
- }
- if(IsAVagosCar(vehicleid))
- {
- if(Gang[playerid] != 4)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- SetPlayerPos(playerid, x, y, z+0.5);
- SendClientMessage(playerid, -1, "You are not part of the Los Santos Vagos.");
- }
- else
- {
- return 1;
- }
- }
- return 1;
- }
- //============================================================================//
- //================================[COMMANDS]==================================//
- //============================================================================//
- CMD:jetpack(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- SetPlayerSpecialAction(playerid, 2);
- return 1;
- }
- CMD:slap(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new
- targetid,Float:health,string[128],reason[48],Float:Pos[4];
- if(sscanf(params, "us[48]", targetid,reason)) return SCM(playerid, -1, "USAGE: /slap [playerid] [reason]");
- GetPlayerHealth(targetid,health); SetPlayerHealth(targetid,health-10);
- GetPlayerPos(targetid, Pos[0], Pos[1], Pos[2]);
- SetPlayerPos(targetid, Pos[0], Pos[1], Pos[2]+10);
- format(string,sizeof(string),"Admin %s slaped %s|Reason: %s",GetName(playerid),GetName(targetid),reason);
- SendClientMessageToAll(Red,string);
- }
- return 1;
- }
- CMD:setscore(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new string[70],target,score;
- if(sscanf(params,"ui",target,score)) return SCM(playerid,-1,"[USAGE] /setscore [PlayerID/PartOfName] [Score]");
- if( target == INVALID_PLAYER_ID) return SCM(playerid,Red,"** Player not found.");
- {
- SetPlayerScore(target,score);
- format(string,sizeof(string),"** You've set %s score to %d.",sendername(target),score);
- SCM(playerid,AztecasColor,string);
- format(string,sizeof(string),"** %s has set your score to %d.",sendername(playerid),score);
- SCM(playerid,AztecasColor,string);
- }
- }
- return 1;
- }
- CMD:repair(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vid;
- vid = GetPlayerVehicleID(playerid);
- RepairVehicle(vid);
- SCM(playerid,AztecasColor,"** Vehicle successfully repaired.");
- } else SCM(playerid,Red,"** You are not in any vehicle.");
- }
- else { SCM(playerid,-1,"Your not admin"); }
- }
- CMD:ann(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new string[20];
- if(sscanf(params,"s[20]",string)) return SCM(playerid,Red,"** /ann [Text]");
- GameTextForAll(string,2000,5);
- }
- return 1;
- }
- CMD:ban(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- new target;
- new reason[64];
- new str[128];
- new day,month,year;
- getdate(year, month, day);
- new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Adminname, sizeof(Adminname));
- GetPlayerName(target, Playername, sizeof(Playername));
- if(sscanf(params, "us[64]", target,reason)) return SCM(playerid, -1, "[INFO]{FFFFFF}: /ban [playerid] [reason]");
- if(!IsPlayerConnected(target)) return SCM(playerid,Red, "** Player not found.");
- format(str, sizeof(str), "[Adm] %s has been banned by %s. Reason: %s (%d-%d-%d) ", Playername, Adminname, reason,year,month,day);
- SendClientMessageToAll(Red, str);
- printf(str);
- BanLog(str);
- PlayerInfo[target][pBanned] = 1;
- SetTimerEx("bantimer", 1000, false, "d", target);
- }
- else
- {
- SCM(playerid,Red,"Your not admin");
- }
- return 1;
- }
- CMD:kick(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- new target,reason[64],str[128],logstring[200],month,day,year;
- new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Adminname, sizeof(Adminname));
- GetPlayerName(target, Playername, sizeof(Playername));
- getdate(year, month, day);
- if(sscanf(params, "us[64]", target,reason)) return SCM(playerid, WHITE, "[INFO]{FFFFFF}: /kick [playerid] [reason]");
- if(!IsPlayerConnected(target))
- return SCM(playerid, WHITE, "Player is not connected!");
- format(str, sizeof(str), "[Adm] %s has been kicked by '%s'. Reason: %s (%d-%d-%d) ", Playername, Adminname, reason,year,month,day);
- printf(str);
- format(logstring, sizeof(logstring), "Info: %s was kicked by %s, reason: %s (%d-%d-%d).",sendername(target),sendername(playerid),reason,year,month,day);
- KickLog(logstring);
- SetTimerEx("kicktimer", 1000, false, "d", target);
- }
- else
- {
- SCM(playerid,AztecasColor,"Your not admin");
- }
- return 1;
- }
- CMD:givemoney(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- new string[128],string2[128], targetid, money;
- if(sscanf(params, "ud", targetid, money)) return SCM(playerid,LIGHTBLUE, "[INFO]{FFFFFF}: /givemoney [playerid] [money]");
- if((targetid == INVALID_PLAYER_ID)) return SCM(playerid,Red,"** Player not found.");
- if(IsPlayerConnected(targetid))
- {
- GivePlayerMoney(targetid, money);
- format(string, sizeof(string), "* You have gave %s an amount of $%d.",sendername(targetid),money);
- SCM(playerid,GroveColor, string);
- format(string2,sizeof(string2),"[Money] %s given %s --> %d.",sendername(playerid),sendername(targetid),money);
- printf(string2);
- }
- }
- else
- {
- SCM(playerid,Red,"Your not admin");
- }
- return 1;
- }
- CMD:setskin(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- new id, skinid, string[128];
- if(sscanf(params, "ui", id, skinid)) return SCM(playerid,Red, " /setskin [playerid] [1-299] ");
- if(skinid < 1 || skinid > 299) return SCM(playerid,Red, "/setskin [playerid] [1-299].");
- if(id == INVALID_PLAYER_ID) return SCM(playerid,Red,"** Player not found.");
- PlayerInfo[id][pSkin] = skinid;
- SetPlayerSkin(id, skinid);
- format(string, 128, "[INFO]{FFFFFF}: Administrator %s has set your skin ID to %i.", sendername(playerid),skinid);
- SCM(id, LIGHTBLUE, string);
- format(string, 128, "[INFO]{FFFFFF}: You have set %s skin ID to %i",sendername(id),skinid);
- SCM(playerid, AztecasColor, string);
- }
- return 1;
- }
- CMD:gethere(playerid,params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- new target;
- new string[128],vw;
- if(sscanf(params, "u", target)) return SCM(playerid,LIGHTBLUE, "** /gethere [playerid/partofname].");
- if(!IsPlayerConnected(target)) return SCM(playerid,LIGHTBLUE, "** Player not found.");
- {
- format(string,sizeof string,"** You teleported %s to your location.",sendername(target));
- SCM(playerid,LIGHTBLUE,string);
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid,X,Y,Z);
- SetPlayerPos(target,X,Y+2,Z);
- SetPlayerVirtualWorld(target,vw);
- SCM(target,LIGHTBLUE,"You have been teleported by an admin.");
- }
- }
- return 1;
- }
- CMD:goto(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- new vw,Float:x,Float:y,Float:z,ID,str[128];
- if(sscanf(params, "u", ID)) return SCM(playerid,LIGHTBLUE, "** /goto [Playerid].");
- if(!IsPlayerConnected(ID)) return SCM(playerid,LIGHTBLUE, "** Player not found.");
- GetPlayerPos(ID, x, y, z);
- vw = GetPlayerVirtualWorld(ID);
- SetPlayerPos(playerid, x+1, y+1, z);
- SetPlayerVirtualWorld(playerid,vw);
- format(str, sizeof(str), "You have been teleported to %s.",sendername(ID));
- SCM(playerid,LIGHTBLUE, str);
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vid = GetPlayerVehicleID(playerid);
- GetPlayerPos(ID, x, y, z);
- SetVehiclePos(vid,x,y,z);
- }
- }
- }
- return 1;
- }
- CMD:setadmin(playerid,params[])
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] >= 1 || IsPlayerAdmin(playerid))
- {
- new target;
- new level;
- if(sscanf(params,"ui",target,level)) return SCM(playerid, WHITE, "[INFO]{FFFFFF}: /setadmin [Playerid/PartOfName] [level]");
- else if (target == INVALID_PLAYER_ID) return SCM(playerid, WHITE, "[INFO]{FFFFFF}: Player is not connected.");
- {
- new string[126];
- PlayerInfo[target][pAdmin] = level;
- if(level > 1 || level <= 0) return SCM(playerid,Red,"Max admin level is 1");
- printf("[!] %s has promoted %s to level %d admin. [!]",sendername(playerid),sendername(target), level);
- format(string, sizeof(string), " [Adm] You have been promoted to a level %d admin by %s.", level,sendername(playerid));
- SCM(target, WHITE, string);
- format(string, sizeof(string), "[Adm] You have promoted %s to a level %d admin.",sendername(target),level);
- SCM(playerid, LIGHTBLUE, string);
- }
- }
- }
- return 1;
- }
- CMD:ahelp(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- SCM(playerid,GroveColor,"Admin commands");
- SCM(playerid,VagosColor,"/jetpack /slap /setscore /repair /ann /ban /kick /givemoney /setadmin /setskin /goto /gethere");
- return 1;
- }
- CMD:report(playerid, params[])
- {
- new
- targetid,string[256],reason[100];
- if(sscanf(params, "ds[100]", targetid,reason)) return SCM(playerid, Red,"USAGE: /Report [playerid] [reason]");
- format(string,sizeof(string),"REPORT:%s %d has reported %s %d|Reason:%s",GetName(playerid),playerid,GetName(targetid),targetid,reason);
- SendAdminMessage(string);
- SCM(playerid, VagosColor, "Report successfully sended");
- return 1;
- }
- CMD:admins(playerid,params[])
- {
- if(IsPlayerConnected(playerid))
- {
- SCM(playerid, WHITE, "================================================");
- SCM(playerid, WHITE, "Online Admins:");
- foreach(Player, i)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pAdmin] >= 1)
- {
- new admtext[100];
- new string[100];
- {
- if(PlayerInfo[i][pAdmin] >= 6) { admtext = "Owner"; }
- }
- format(string, sizeof(string), "(ID %d) %s:%s (Adminlevel: %d)",i,admtext, sendername(i),PlayerInfo[i][pAdmin]);
- SCM(playerid,-1, string);
- }
- }
- }
- SCM(playerid, WHITE, "================================================");
- }
- return 1;
- }
- CMD:pm(playerid, params[])
- {
- new str[100], str2[100], id;
- if(sscanf(params, "us", id, str2))
- {
- SCM(playerid, WHITE, "Error: /PM [playerid] [message]");
- return 1;
- }
- if(apm == 0)
- {
- if(!IsPlayerConnected(id)) return SCM(playerid, WHITE, "[INFO]{FFFFFF}:Player is not connected.");
- {
- format(str, sizeof(str), "(( PM to %s[%d]: %s ))", sendername(id), id, str2);
- SCM(playerid,PINK, str);
- format(str, sizeof(str), " (( PM from %s[%d]: %s ))", sendername(playerid), playerid, str2);
- SCM(id,PINK, str);
- }
- } else { SCM(playerid,VagosColor,"** Private Messages are currently disabled!"); }
- return 1;
- }
- CMD:rules(playerid, params[])
- {
- SendClientMessage(playerid, AztecasColor, "Rules");
- SendClientMessage(playerid, Orange, "1.Do not Ram!");
- SendClientMessage(playerid, Orange, "2.Do not Death Evade!");
- SendClientMessage(playerid, Orange, "3.hacks/mods not allowed!");
- SendClientMessage(playerid, Orange, "5.Respect all players/admins!");
- SendClientMessage(playerid, Orange, "6.C-Bug SlideBug DoubleBug are allowed!");
- SendClientMessage(playerid, Orange, "7.Do not ask for admin but you can make a admin application");
- return true;
- }
- CMD:kill(playerid, params[]) {
- SetPlayerHealth(playerid,0);
- SendClientMessage(playerid, 0x33AA33AA, "you killed ur self");
- return 1;
- }
- CMD:spawn(playerid, params[]) {
- SpawnPlayer(playerid);
- SendClientMessage(playerid, 0x33AA33AA, "your spawned");
- return 1;
- }
- CMD:gang(playerid, params[])
- {
- SetPlayerHealth(playerid,0);
- ForceClassSelection(playerid);
- return 1;
- }
- CMD:nitro(playerid, params[])
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xff0000ff,"You must be in a vehicle!");
- AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
- SendClientMessage(playerid,GroveColor,"Nitro added!");
- return 1;
- }
- CMD:help(playerid, params[])
- {
- SCM(playerid,GroveColor,"Player commands");
- SCM(playerid,VagosColor,"/report /admins /pm /rules /nitro /gang /spawn /kill");
- return 1;
- }
- //===============================[The End]====================================//
Advertisement
Add Comment
Please, Sign In to add comment