Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Credits to Y_Less, Dracoblue and Kush.
- /*
- Some good codes here
- PlayerInfo[playerid][pRank] = 1; " On this servrer pRank is "XP" to ranks
- PlayerInfo[playerid][pKills] = amount;
- */
- #include <a_samp>
- #include <YSI\y_ini>
- #include <zcmd>
- #include <sscanf2>
- #define DIALOG_REGISTER 1
- #define DIALOG_LOGIN 2
- #define DIALOG_SUCCESS_1 3
- #define DIALOG_SUCCESS_2 4
- #define PATH "/Users/%s.ini"
- #define COL_WHITE "{FFFFFF}"
- #define COL_RED "{F81414}"
- #define COL_GREEN "{00FF22}"
- #define COL_LIGHTBLUE "{00CED1}"
- // Colors
- #define COLOR_WHITE 0xFFFFFFAA
- #define white 0xFFFFFFAA
- #define yellow 0xFFFFF00AA
- #define red 0x660000AA
- #define pink 0xFF66FFAA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define darkred 0x660000AA
- #define BLUE 0x375FFFFF
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GOLD 0xD2691EAA
- #define orange 0xFF9900AA
- #define nicepink 0xEC13COFF
- #define TEAM_GROVE_COLOR 0xB4B5B7AA
- #define green 0x7CFC00AA
- #define COLOR_RED 0xFF0000AA
- #define RED 0xFF0000AA
- #define COLOR_DRED 0xFF0000AA //defines red color
- #undef MAX_PLAYERS
- #define MAX_PLAYERS 32 // Here you need to set the maximum number of players able to play on your server at any given time, I'll put 32 because that's the max players on my server.
- #define GREEN 0x15FF00AA
- #define BLUE 0x375FFFFF
- #define WHITE 0xFFFFFFFF
- #define YELLOW 0xF2FF00AA
- #define GREY 0xAAAAAAAA
- #define LIGHTBLUE 0x515BC7AA
- new aDuty[MAX_PLAYERS];
- new Text:Textdraw2;
- new TRank[150];
- new sniper,sniper1;
- new bomb;
- new Float:bombx,Float:bomby,Float:bombz;
- enum pInfo
- {
- pPass,
- pCash,
- pAdmin,
- pKills,
- pDeaths,
- pScore,
- pRank,
- Frozen,
- pBanned,
- pWarn,
- pMuted,
- pMuteTime,
- pVip,
- pMap,
- pKS
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- forward AntiSpawnkill(playerid);
- forward Map(playerid);
- forward Radio(playerid);
- forward Radio1(playerid);
- forward Radio2(playerid);
- forward rSpawn(playerid);
- forward Spec(playerid);
- forward hittar();
- forward LoadUser_data(playerid,name[],value[]);
- 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("Score",PlayerInfo[playerid][pScore]);
- INI_Int("Rank",PlayerInfo[playerid][pRank]);
- INI_Int("Banned",PlayerInfo[playerid][pBanned]);
- INI_Int("Warns",PlayerInfo[playerid][pWarn]);
- INI_Int("Muted",PlayerInfo[playerid][pMuted]);
- INI_Int("MuteTime",PlayerInfo[playerid][pMuteTime]);
- INI_Int("Vip",PlayerInfo[playerid][pVip]);
- INI_Int("Map",PlayerInfo[playerid][pMap]);
- INI_Int("Killstreak",PlayerInfo[playerid][pKS]);
- return 1;
- }
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- /*Credits to Dracoblue*/
- 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;
- }
- main()
- {
- print("\n----------------------------------");
- print(" 10% 20% 30% 40%");
- print(" 50% 60% 70% 80%");
- print(" 90% 95% 98% 99%");
- print(" 100% 100% 100%");
- print(" Server Work Fine Now! ");
- print(" _____________________");
- print(" Dino D Carter");
- print(" Deathmatch.");
- print(" _____________________");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- Textdraw2 = TextDrawCreate(390.000000, 0.000000, "Rank:~r~");
- TextDrawBackgroundColor(Textdraw2, 16711935);
- TextDrawFont(Textdraw2, 1);
- TextDrawLetterSize(Textdraw2, 0.570000, 2.700000);
- TextDrawColor(Textdraw2, 65535);
- TextDrawSetOutline(Textdraw2, 1);
- TextDrawSetProportional(Textdraw2, 1);
- sniper = CreatePickup(358, 3, 2321.1763,-84.9634,31.4834);//(model,type,z,x,y);
- sniper1 = CreatePickup(358, 3, 2323.7632,-42.8470,32.7277);
- // health1 = CreatePickup(1240, 22, 2292.3342,-133.2999,27.4766);
- // armour1 = CreatePickup(1242, 22, 2332.6990,-144.6696,27.4766);
- CreateObject(792,2526.00000000,2773.19995117,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (1)
- CreateObject(792,2530.80004883,2773.30004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (2)
- CreateObject(792,2535.00000000,2773.30004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (3)
- CreateObject(792,2539.00000000,2773.30004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (4)
- CreateObject(792,2543.50000000,2773.30004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (5)
- CreateObject(792,2547.50000000,2773.30004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (6)
- CreateObject(792,2551.80004883,2773.30004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (7)
- CreateObject(792,2555.30004883,2773.30004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (8)
- CreateObject(792,2560.00000000,2773.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (9)
- CreateObject(792,2564.00000000,2773.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (10)
- CreateObject(792,2568.00000000,2773.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (11)
- CreateObject(792,2572.30004883,2773.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (12)
- CreateObject(792,2576.30004883,2773.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (13)
- CreateObject(792,2577.00000000,2787.89990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (14)
- CreateObject(792,2572.30004883,2788.10009766,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (15)
- CreateObject(792,2568.50000000,2788.00000000,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (16)
- CreateObject(792,2564.30004883,2788.19995117,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (17)
- CreateObject(792,2559.80004883,2788.19995117,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (18)
- CreateObject(792,2555.80004883,2788.60009766,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (19)
- CreateObject(792,2551.80004883,2788.50000000,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (20)
- CreateObject(792,2547.80004883,2788.19995117,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (21)
- CreateObject(792,2543.80004883,2788.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (22)
- CreateObject(792,2539.30004883,2788.60009766,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (23)
- CreateObject(792,2529.89990234,2764.60009766,10.30000019,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (24)
- CreateObject(792,2528.39990234,2764.69995117,10.30000019,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (25)
- CreateObject(792,2545.39990234,2764.10009766,10.30000019,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (26)
- CreateObject(792,2546.89990234,2764.00000000,10.30000019,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (27)
- CreateObject(792,2564.89990234,2764.10009766,10.30000019,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (28)
- CreateObject(792,2563.19995117,2764.19995117,10.30000019,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (29)
- CreateObject(792,2522.69995117,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (31)
- CreateObject(792,2518.39990234,2756.00000000,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (32)
- CreateObject(792,2526.69995117,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (33)
- CreateObject(792,2530.89990234,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (34)
- CreateObject(792,2534.89990234,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (35)
- CreateObject(792,2539.39990234,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (36)
- CreateObject(792,2543.60009766,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (37)
- CreateObject(792,2547.80004883,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (38)
- CreateObject(792,2551.50000000,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (39)
- CreateObject(792,2555.50000000,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (40)
- CreateObject(792,2560.00000000,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (41)
- CreateObject(792,2564.00000000,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (42)
- CreateObject(792,2568.30004883,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (43)
- CreateObject(792,2572.80004883,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (44)
- CreateObject(792,2576.80004883,2755.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (45)
- CreateObject(792,2576.89990234,2750.50000000,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (46)
- CreateObject(792,2572.10009766,2750.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (47)
- CreateObject(792,2568.39990234,2750.50000000,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (48)
- CreateObject(792,2564.19995117,2750.60009766,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (49)
- CreateObject(792,2560.00000000,2750.69995117,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (50)
- CreateObject(792,2555.50000000,2750.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (51)
- CreateObject(792,2551.69995117,2750.30004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (52)
- CreateObject(792,2547.69995117,2750.39990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (53)
- CreateObject(792,2543.50000000,2750.50000000,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (54)
- CreateObject(792,2539.30004883,2750.60009766,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (55)
- CreateObject(792,2535.10009766,2750.69995117,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (56)
- CreateObject(792,2530.80004883,2750.60009766,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (57)
- CreateObject(792,2526.60009766,2750.69995117,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (58)
- CreateObject(792,2522.60009766,2750.80004883,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (59)
- CreateObject(792,2518.60009766,2750.89990234,10.10000038,0.00000000,0.00000000,0.00000000); //object(aw_streettree1) (60)
- CreateObject(994,2571.00000000,2756.69995117,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (1)
- CreateObject(994,2563.00000000,2756.80004883,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (2)
- CreateObject(994,2555.30004883,2756.89990234,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (3)
- CreateObject(994,2547.30004883,2757.00000000,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (4)
- CreateObject(994,2539.50000000,2757.10009766,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (5)
- CreateObject(994,2530.30004883,2757.30004883,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (6)
- CreateObject(994,2522.80004883,2757.39990234,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (7)
- CreateObject(994,2525.89990234,2750.19995117,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (8)
- CreateObject(994,2533.39990234,2750.30004883,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (9)
- CreateObject(994,2517.89990234,2750.10009766,9.80000019,0.00000000,0.00000000,358.00000000); //object(lhouse_barrier2) (10)
- CreateObject(994,2542.39990234,2749.80004883,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (12)
- CreateObject(994,2550.39990234,2749.10009766,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (13)
- CreateObject(994,2557.89990234,2749.00000000,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (14)
- CreateObject(994,2565.89990234,2748.89990234,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (15)
- CreateObject(994,2572.39990234,2748.80004883,9.80000019,0.00000000,0.00000000,0.00000000); //object(lhouse_barrier2) (16)
- // Mapa (spawn)
- CreateObject(987,2269.69995117,-146.10000610,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (1)
- CreateObject(987,2233.79980469,-145.89941406,25.00000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (2)
- CreateObject(987,2245.79980469,-146.09960938,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (3)
- CreateObject(987,2257.69921875,-146.09960938,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (4)
- CreateObject(987,2204.60009766,-108.19999695,24.79999924,0.00000000,0.00000000,308.00000000); //object(elecfence_bar) (5)
- CreateObject(987,2226.50000000,-136.59960938,24.79999924,0.00000000,0.00000000,307.99621582); //object(elecfence_bar) (6)
- CreateObject(987,2219.19921875,-127.29980469,24.70000076,0.00000000,0.00000000,307.99621582); //object(elecfence_bar) (7)
- CreateObject(987,2211.79980469,-117.79980469,24.70000076,0.00000000,0.00000000,307.99621582); //object(elecfence_bar) (8)
- CreateObject(987,2194.19995117,-103.09999847,25.29999924,0.00000000,0.00000000,329.99621582); //object(elecfence_bar) (9)
- CreateObject(987,2184.39990234,-100.80000305,25.79999924,0.00000000,0.00000000,345.99084473); //object(elecfence_bar) (10)
- CreateObject(987,2176.39990234,-92.80000305,25.39999962,0.00000000,0.00000000,317.98693848); //object(elecfence_bar) (11)
- CreateObject(987,2176.19995117,-80.80000305,25.29999924,0.00000000,0.00000000,269.98278809); //object(elecfence_bar) (12)
- CreateObject(987,2176.10009766,-68.80000305,24.89999962,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (13)
- CreateObject(987,2176.10009766,-56.79999924,24.89999962,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (14)
- CreateObject(987,2176.10009766,-45.00000000,24.89999962,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (15)
- CreateObject(987,2176.10009766,-33.00000000,24.89999962,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (16)
- CreateObject(987,2191.10009766,-13.80000019,24.20000076,0.00000000,0.00000000,3.97802734); //object(elecfence_bar) (17)
- CreateObject(987,2281.69995117,-146.10000610,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (18)
- CreateObject(987,2293.69995117,-146.10000610,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (19)
- CreateObject(987,2305.69995117,-146.10000610,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (20)
- CreateObject(987,2317.69995117,-146.10000610,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (21)
- CreateObject(987,2383.30004883,-98.59999847,25.39999962,0.00000000,0.00000000,256.00000000); //object(elecfence_bar) (22)
- CreateObject(987,2329.69921875,-146.09960938,25.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (23)
- CreateObject(987,2341.09960938,-146.09960938,25.60000038,0.00000000,0.00000000,35.99670410); //object(elecfence_bar) (24)
- CreateObject(987,2351.19921875,-139.19921875,25.79999924,0.00000000,0.00000000,35.99670410); //object(elecfence_bar) (25)
- CreateObject(987,2361.09960938,-132.19921875,26.39999962,0.00000000,0.00000000,35.99670410); //object(elecfence_bar) (26)
- CreateObject(987,2371.00000000,-125.50000000,27.00000000,0.00000000,0.00000000,35.99670410); //object(elecfence_bar) (27)
- CreateObject(987,2385.89990234,-94.59999847,25.20000076,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (29)
- CreateObject(987,2386.89990234,-58.70000076,25.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (30)
- CreateObject(987,2385.69921875,-82.59960938,25.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (31)
- CreateObject(987,2385.89941406,-70.59960938,26.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (32)
- CreateObject(987,2176.09960938,-21.00000000,24.89999962,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (33)
- CreateObject(987,2181.79980469,-10.89941406,24.20000076,0.00000000,0.00000000,243.97338867); //object(elecfence_bar) (34)
- CreateObject(987,2182.09960938,-11.19921875,24.79999924,0.00000000,0.00000000,347.97546387); //object(elecfence_bar) (35)
- CreateObject(987,2205.69995117,-17.00000000,24.70000076,0.00000000,0.00000000,347.97546387); //object(elecfence_bar) (36)
- CreateObject(987,2387.50000000,-46.50000000,26.10000038,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (37)
- CreateObject(987,2389.89990234,-20.79999924,25.29999924,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (38)
- CreateObject(987,2389.39990234,-32.79999924,25.29999924,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (39)
- CreateObject(987,2386.19995117,-18.89999962,25.50000000,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (40)
- CreateObject(987,2374.19995117,-18.70000076,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (41)
- CreateObject(987,2362.19995117,-18.39999962,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (42)
- CreateObject(987,2350.89990234,-18.10000038,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (43)
- CreateObject(987,2339.10009766,-17.79999924,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (44)
- CreateObject(987,2304.50000000,-18.00000000,25.50000000,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (45)
- CreateObject(987,2292.30004883,-17.70000076,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (46)
- CreateObject(987,2281.00000000,-17.39999962,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (47)
- CreateObject(987,2269.30004883,-17.60000038,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (48)
- CreateObject(987,2257.50000000,-17.79999924,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (49)
- CreateObject(987,2245.80004883,-18.00000000,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (50)
- CreateObject(987,2234.50000000,-18.20000076,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (51)
- CreateObject(987,2228.80004883,-18.29999924,25.50000000,0.00000000,0.00000000,191.99450684); //object(elecfence_bar) (52)
- CreateObject(987,2315.69995117,-17.50000000,29.29999924,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (53)
- CreateObject(987,2321.89990234,-17.20000076,29.29999924,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (54)
- CreateObject(987,2333.60009766,-16.70000076,29.29999924,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (55)
- CreateObject(987,2386.89990234,-58.70000076,30.00000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (56)
- CreateObject(987,2386.10009766,-70.40000153,30.00000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (57)
- CreateObject(987,2379.69921875,-118.39941406,27.20000076,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (58)
- CreateObject(987,2386.80004883,-91.59999847,25.79999924,0.00000000,0.00000000,245.99719238); //object(elecfence_bar) (59)
- CreateObject(987,2390.39990234,-18.89999962,25.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (60)
- CreateObject(987,2197.19995117,-10.39999962,24.10000038,0.00000000,0.00000000,321.97546387); //object(elecfence_bar) (61)
- CreateObject(987,2176.10009766,-21.00000000,29.20000076,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (62)
- CreateObject(987,2176.10009766,-32.20000076,29.20000076,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (63)
- CreateObject(987,2176.10009766,-43.70000076,29.20000076,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (64)
- CreateObject(987,2176.10009766,-55.40000153,29.20000076,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (65)
- CreateObject(987,2176.10009766,-66.90000153,29.20000076,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (66)
- CreateObject(987,2176.10009766,-78.59999847,29.20000076,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (67)
- CreateObject(987,2176.10009766,-82.59999847,29.20000076,0.00000000,0.00000000,269.97802734); //object(elecfence_bar) (68)
- CreateObject(987,2176.39990234,-92.80000305,28.70000076,0.00000000,0.00000000,317.98278809); //object(elecfence_bar) (69)
- CreateObject(987,2184.39990234,-100.80000305,28.79999924,0.00000000,0.00000000,345.98693848); //object(elecfence_bar) (70)
- CreateObject(987,2194.19995117,-103.09999847,28.60000038,0.00000000,0.00000000,329.99084473); //object(elecfence_bar) (71)
- CreateObject(987,2204.60009766,-108.19999695,28.29999924,0.00000000,0.00000000,307.99621582); //object(elecfence_bar) (72)
- CreateObject(987,2211.80004883,-117.80000305,28.50000000,0.00000000,0.00000000,307.99621582); //object(elecfence_bar) (73)
- CreateObject(987,2219.19995117,-127.30000305,28.50000000,0.00000000,0.00000000,307.99621582); //object(elecfence_bar) (74)
- CreateObject(987,2226.50000000,-136.60000610,28.29999924,0.00000000,0.00000000,307.99621582); //object(elecfence_bar) (75)
- CreateObject(987,2233.80004883,-145.89999390,28.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (76)
- CreateObject(987,2245.80004883,-145.80000305,28.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (77)
- CreateObject(987,2257.50000000,-145.69999695,28.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (78)
- CreateObject(987,2269.19995117,-145.89999390,28.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (79)
- CreateObject(987,2281.69995117,-146.10000610,28.10000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (85)
- CreateObject(987,2293.69995117,-146.10000610,28.10000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (86)
- CreateObject(987,2305.69995117,-146.10000610,28.29999924,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (87)
- CreateObject(987,2317.69995117,-146.10000610,28.10000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (88)
- CreateObject(987,2329.69995117,-146.10000610,28.10000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (89)
- CreateObject(987,2388.89990234,-37.79999924,25.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (90)
- CreateObject(987,2181.80004883,-10.89999962,22.20000076,0.00000000,0.00000000,243.97338867); //object(elecfence_bar) (91)
- CreateObject(987,2182.10009766,-11.19999981,22.29999924,0.00000000,0.00000000,347.97546387); //object(elecfence_bar) (92)
- UsePlayerPedAnims(); // CJ run stile
- ShowPlayerMarkers(2); // can see players on map
- AllowInteriorWeapons(1);
- // EnableTirePopping(1);
- // EnableStuntBonusForAll(1);
- SetWorldTime(2);
- DisableInteriorEnterExits();
- SetGameModeText("Novi DM By: Dino D Carter");
- AddPlayerClass(29,2254.2102,-125.9353,27.3745,353.9657,24,1000,27,1000,0,0); // Team 1
- AddPlayerClass(288,2199.3601,-65.9702,27.4838,280.9817,24,1000,27,1000,0,0); // Team 2
- AddPlayerClass(290,2259.1921,-46.1658,26.4844,352.8803,24,1000,27,1000,0,0); // Team 3
- AddPlayerClass(295,2319.1152,-68.3436,26.4844,166.7821,24,1000,27,1000,0,0); // Team 4
- AddPlayerClass(268,2269.4578,-18.6867,26.4844,183.3165,24,1000,27,1000,0,0); // Team 5
- AddPlayerClass(269,2260.9419,-71.4783,31.6016,256.3965,24,1000,27,1000,0,0); // Team 6
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- switch (classid) {
- case 0:
- {
- GameTextForPlayer(playerid, "~n~~n~~n~~r~Team 1", 500, 3);
- {SetPlayerPos(playerid, 1176.287,-1994.802,69.00781);
- SetPlayerFacingAngle(playerid,730);
- SetPlayerCameraPos(playerid, 1174.287,-1991.802,69.00781);
- SetPlayerCameraLookAt(playerid, 1176.287,-1994.802,69.00781);}
- }
- case 1:
- {
- GameTextForPlayer(playerid, "~n~~n~~n~~b~Team 2", 500, 3);
- {SetPlayerPos(playerid, 1176.287,-1994.802,69.00781);
- SetPlayerFacingAngle(playerid,730);
- SetPlayerCameraPos(playerid, 1174.287,-1991.802,69.00781);
- SetPlayerCameraLookAt(playerid, 1176.287,-1994.802,69.00781);}
- }
- case 2:
- {
- GameTextForPlayer(playerid, "~n~~n~~n~~y~Team 3", 500, 3);
- {SetPlayerPos(playerid, 1176.287,-1994.802,69.00781);
- SetPlayerFacingAngle(playerid,730);
- SetPlayerCameraPos(playerid, 1174.287,-1991.802,69.00781);
- SetPlayerCameraLookAt(playerid, 1176.287,-1994.802,69.00781);}
- }
- case 3:
- {
- GameTextForPlayer(playerid, "~n~~n~~n~~g~Team 4", 500, 3);
- {SetPlayerPos(playerid, 1176.287,-1994.802,69.00781);
- SetPlayerFacingAngle(playerid,730);
- SetPlayerCameraPos(playerid, 1174.287,-1991.802,69.00781);
- SetPlayerCameraLookAt(playerid, 1176.287,-1994.802,69.00781);}
- }
- case 4:
- {
- GameTextForPlayer(playerid, "~n~~n~~n~~r~Team 5", 500, 3);
- {SetPlayerPos(playerid, 1176.287,-1994.802,69.00781);
- SetPlayerFacingAngle(playerid,730);
- SetPlayerCameraPos(playerid, 1174.287,-1991.802,69.00781);
- SetPlayerCameraLookAt(playerid, 1176.287,-1994.802,69.00781);}
- }
- case 5:
- {
- GameTextForPlayer(playerid, "~n~~n~~n~~r~Team 6", 500, 3);
- {SetPlayerPos(playerid, 1176.287,-1994.802,69.00781);
- SetPlayerFacingAngle(playerid,730);
- SetPlayerCameraPos(playerid, 1174.287,-1991.802,69.00781);
- SetPlayerCameraLookAt(playerid, 1176.287,-1994.802,69.00781);}
- }
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- if(fexist(UserPath(playerid)))
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
- }
- new string[64], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- new ip[64];
- GetPlayerIp(playerid, ip, sizeof(ip));
- format(string,sizeof string,"%s has joined the server. ( %s )",pName, ip);
- SendClientMessageToAll(green,string);
- aDuty[playerid] = 0; //Set player off duty when connects
- PlayAudioStreamForPlayer(playerid, "http://k003.kiwi6.com/hotlink/ew91ll2ma2/deadmau5_-_a_city_in_florida_original_mix_hd.mp3");
- SetTimerEx("Map",300000,0,"i",playerid); // Start to count to the next map.
- SetTimerEx("Radio",300000,0,"i",playerid); // Audio
- if(PlayerInfo[playerid][pWarn] >= 3)
- {
- Kick(playerid);
- }
- else if(PlayerInfo[playerid][pVip] >= 1)
- {
- SendClientMessageToAll(0x58AB54FF, "Gold VIP has joind server!");
- }
- else if(PlayerInfo[playerid][pVip] >= 2)
- {
- SendClientMessageToAll(0x58AB54FF, "Silver VIP has joind server!");
- }
- else if(PlayerInfo[playerid][pVip] >= 3)
- {
- SendClientMessageToAll(0x58AB54FF, "Bronze VIP has joind server!");
- }
- else if(PlayerInfo[playerid][pAdmin] >= 1338)
- {
- SendClientMessageToAll(0x58AB54FF, "Server Owner has joind the server!");
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- 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,"Kills",PlayerInfo[playerid][pKills]);
- INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
- INI_WriteInt(File,"Score",PlayerInfo[playerid][pScore]);
- INI_WriteInt(File,"Rank",PlayerInfo[playerid][pRank]);
- INI_WriteInt(File,"Banned",PlayerInfo[playerid][pBanned]);
- INI_WriteInt(File,"Warns",PlayerInfo[playerid][pWarn]);
- INI_WriteInt(File,"Muted",PlayerInfo[playerid][pMuted]);
- INI_WriteInt(File,"MuteTime",PlayerInfo[playerid][pMuteTime]);
- INI_WriteInt(File,"Vip",PlayerInfo[playerid][pVip]);
- INI_WriteInt(File,"Map",PlayerInfo[playerid][pMap]);
- INI_WriteInt(File,"Ks",PlayerInfo[playerid][pKS]);
- INI_Close(File);
- new string[64],
- name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,MAX_PLAYER_NAME);
- aDuty[playerid] = 0; //set player off duty when disconnects
- PlayerInfo[playerid][pMap] = 0;
- switch(reason)
- {
- case 0: format(string,sizeof string,"%s left the server. (Timed out)",name);
- case 1: format(string,sizeof string,"%s left the server. (Leaving)",name);
- case 2: format(string,sizeof string,"%s left the server. (Kicked/Banned)",name);
- }
- SendClientMessageToAll(0xFFFFFFAA,string);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SetPlayerArmour(playerid, 100);
- SetPlayerHealth(playerid, 10000000000000.0);
- SetPlayerArmour(playerid, 100.0);
- GivePlayerWeapon(playerid, 30, 800);
- GivePlayerWeapon(playerid, 28, 800);
- GivePlayerWeapon(playerid, 16, 800);
- GivePlayerWeapon(playerid, 4, 800);
- GivePlayerWeapon(playerid, 33, 800);
- SendClientMessage(playerid, 0xFF0000AA, "[INFO]:You have 6 seconds of Anti-Spawnkill protection");
- SetPlayerChatBubble(playerid, "[INFO]:Anti-Spawnkill protected player", 0xFF0000AA, 100.0, 10000);
- SetTimerEx("AntiSpawnkill",6000,0,"i",playerid);
- // SetTimerEx("Map",10000,0,"i",playerid);
- SetPlayerWeather(playerid, 0);
- if(PlayerInfo[playerid][Frozen] == 1) //Get the info outta the enum and check if the player is still frozen
- {
- TogglePlayerControllable(playerid,0); //Won't let the player move
- SendClientMessage(playerid,red,"WARNING: You are still frozen!"); //Send him a message
- }
- if(PlayerInfo[playerid][pMap] == 1)
- {
- SetPlayerPos(playerid, 2527.72,2729.96,10.8203);
- }
- if(PlayerInfo[playerid][pBanned] == 1)
- {
- SendClientMessage(playerid,red,"WARNING: This account is banned from this server. Wisit our forum if you think you have been banned for no reason.");
- Kick(playerid);
- }
- if(PlayerInfo[playerid][pRank] == 1000)
- {
- SendClientMessage(playerid,red,"You are the max level.");
- new message[64], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- new ip[64];
- GetPlayerIp(playerid, ip, sizeof(ip));
- format(message,sizeof message,"%s have 1000 exp. That means %s is highest level.",pName, pName);
- SendClientMessageToAll(green,message);
- }
- new string[ 128 ];
- if(PlayerInfo[playerid][pRank] >= 1000)
- {
- TRank = "6"; /// The rank name
- TextDrawSetString(Textdraw2, string);
- }
- else if(PlayerInfo[playerid][pRank] >= 700 && PlayerInfo[playerid][pRank] >= 1000)
- {
- TRank = "5"; /// The rank name
- TextDrawSetString(Textdraw2, string);
- }
- else if(PlayerInfo[playerid][pRank] >= 500 && PlayerInfo[playerid][pRank] >= 700)
- {
- TRank = "4"; /// The rank name
- TextDrawSetString(Textdraw2, string);
- }
- else if(PlayerInfo[playerid][pRank] >= 200 && PlayerInfo[playerid][pRank] >= 500)
- {
- TRank = "3"; /// The rank name
- TextDrawSetString(Textdraw2, string);
- }
- else if(PlayerInfo[playerid][pRank] >= 100 && PlayerInfo[playerid][pRank] >= 200)
- {
- TRank = "2"; /// The rank name
- TextDrawSetString(Textdraw2, string);
- }
- else if(PlayerInfo[playerid][pRank] >= 50 && PlayerInfo[playerid][pRank] >= 100)
- {
- TRank = "1"; /// The rank name
- TextDrawSetString(Textdraw2, string);
- }
- else if(PlayerInfo[playerid][pRank] >= 0 && PlayerInfo[playerid][pRank] >= 50)
- {
- TRank = "0"; /// The rank name
- TextDrawSetString(Textdraw2, string);
- }
- format( string, sizeof string, "~y~Rank:~w~ %s",TRank);
- TextDrawSetString(Textdraw2, string);
- TextDrawShowForPlayer( playerid, Textdraw2 );
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- SendClientMessage(playerid, 0x58AB54FF, "You have been killed! Check out our stunts :) ");
- PlayerInfo[playerid][pDeaths]++;
- // SetPlayerScore(playerid, GetPlayerScore( playerid ) -10 );
- PlayerInfo[killerid][pScore]++;
- GivePlayerMoney(killerid, 7000 );
- SendClientMessage(killerid, 0x58AB54FF, "Good shot you've killed him!");
- PlayerInfo[killerid][pKills]++;
- PlayerInfo[killerid][pRank]++;
- PlayerInfo[killerid][pScore]--;
- SetTimerEx("Spec",10000,0,"i",playerid);
- TogglePlayerSpectating(playerid, 1);
- PlayerSpectatePlayer(playerid, killerid);
- new string[128];
- new rank = PlayerInfo[killerid][pRank];
- new score = PlayerInfo[killerid][pScore];
- format(string, sizeof(string), "You [XP] is now [%i/1000]. and you Level is [%d]", rank,score);
- SendClientMessage(killerid, green, string);
- // SetPlayerScore(killerid, GetPlayerScore( killerid ) +10 );
- SetPlayerWantedLevel(killerid, GetPlayerWantedLevel( killerid ) +1 );
- GivePlayerMoney(killerid, -7000 );
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/stats", cmdtext, true, 10) == 0)
- {
- new virworld = GetPlayerVirtualWorld(playerid); // %i
- new ip[64];
- GetPlayerIp(playerid, ip, sizeof(ip));
- new admin = PlayerInfo[playerid][pAdmin];
- new money = GetPlayerMoney(playerid);
- new skin = GetPlayerSkin(playerid);
- new score = PlayerInfo[playerid][pScore];
- new deaths = PlayerInfo[playerid][pDeaths];
- new kills = PlayerInfo[playerid][pKills];
- new car = GetPlayerVehicleID(playerid);
- new wantedlevel = PlayerInfo[playerid][pRank];
- new Float:armour;
- GetPlayerArmour(playerid, armour);
- new name[MAX_PLAYER_NAME+1];
- GetPlayerName(playerid, name, sizeof(name));
- new IP[16];
- GetPlayerIp(playerid, IP, sizeof(IP));
- new weapon = GetPlayerWeapon(playerid);
- new string[736];
- new coordsstring1[256];
- new coordsstring2[160];
- new coordsstring3[160];
- // new coordsstring4[160];
- format(coordsstring1, sizeof(coordsstring1), "\n{44A1D0}You Name: {FFFFFF}[%s] \n{44A1D0}Money: {FFFFFF}[$%d] \n\n{44A1D0}AdminLevel: {FFFFFF}[%d] \n{44A1D0}Skin: {FFFFFF}[%d] ", name,money,admin,skin);
- format(coordsstring2, sizeof(coordsstring2), "{44A1D0}Virworld: {FFFFFF}[%d] \n\n{44A1D0}Kills: {FFFFFF}[%d] \n{44A1D0}Deaths: {FFFFFF}[%d] \n\n{44A1D0}XP: {FFFFFF}[%i] ", virworld,kills,deaths,wantedlevel);
- format(coordsstring3, sizeof(coordsstring3), "\n{44A1D0}Car ID: {FFFFFF}[%d] \n{44A1D0}Armour: {FFFFFF}[%0.f] {44A1D0}Score/LvL: {FFFFFF}[%d] \n{44A1D0}Weapon: {FFFFFF}[%d]", car,armour,score,weapon);
- // format(stats, sizeof stats, "%s", string1,string2);
- format(string, 736," %s%s%s%s",coordsstring1,coordsstring2,coordsstring3);
- ShowPlayerDialog(playerid, 13, DIALOG_STYLE_MSGBOX,"{00C0FF}Hello YouTube! ",string,"Close","");
- // SetPlayerPos(playerid, 2227.72,-88.380,26.3359);
- return 1;
- }
- return 0;
- }
- CMD:help(playerid, params[])
- {
- SendClientMessage(playerid, 0x58AB54FF, "Commands: /kill - /help - /admins - /myrank");
- SendClientMessage(playerid, 0x58AB54FF, "Commands: /nuke - /xp - /accinfo - /stats ");
- SendClientMessage(playerid, 0x58AB54FF, "Commands: /report - /vips - /resstats - /pm");
- SendClientMessage(playerid, 0x58AB54FF, "[Information] - /information. For more Help/Info");
- return true;
- }
- COMMAND:resetmoney(playerid,params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- if(!IsPlayerConnected(playerid))
- {
- new Target;
- if(!sscanf(params, "u", Target))
- {
- if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid,red,"ERROR: Wrong player ID");
- ResetPlayerMoney(Target);
- new tname[MAX_PLAYER_NAME];
- GetPlayerName(Target,tname,sizeof(tname));
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pname,sizeof(pname));
- new tstring[256];
- new pstring[256];
- format(tstring,sizeof(tstring),"Your money has been reseted by %s",pname);
- format(pstring,sizeof(pstring),"You have reseted %s´s(%d) money",tname,Target);
- SendClientMessage(Target,BLUE,tstring);
- SendClientMessage(playerid,BLUE,pstring);
- }
- else SendClientMessage(playerid,YELLOW,"USAGE: /resetmoney <playerid>");
- }
- // else SendClientMessage(playerid,red,"ERROR: You must be logged in to use this command!");
- }
- // else SendClientMessage(playerid,red,"ERROR: You must be an Admin level 2 or higher to perform this command!");
- return 1;
- }
- CMD:information(playerid, params[])
- {
- SendClientMessage(playerid, 0x58AB54FF, "[Information] - /xp (Showing you how much xp you have");
- SendClientMessage(playerid, 0x58AB54FF, "[Information] - /accinfo (Showing you how many warns u have");
- SendClientMessage(playerid, 0x58AB54FF, "[Information] - /myrank (Showing you how witch rank you are");
- SendClientMessage(playerid, 0x58AB54FF, "[Information] - /vips (Showing you how VIPs online");
- SendClientMessage(playerid, 0x58AB54FF, "[Information] - /resstats (Setting you kill/deaths stats to 0)");
- SendClientMessage(playerid, 0x58AB54FF, "[Information] - /nuke (Nuke.. Using a killstreak on somebody");
- SendClientMessage(playerid, 0x58AB54FF, "[Information] - /pm (Send a private message to player(s)");
- SendClientMessage(playerid, 0x58AB54FF, "[Information] - /unlock (Unlocks killstreak. So you can use /nuke..");
- return true;
- }
- CMD:pm(playerid, params[])
- {
- new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
- if(sscanf(params, "us", id, str2))
- {
- SendClientMessage(playerid, 0xFF0000FF, "Usage: /pm <id> <message>");
- return 1;
- }
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Player not connected");
- if(playerid == id) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot pm yourself!");
- {
- GetPlayerName(playerid, Name1, sizeof(Name1));
- GetPlayerName(id, Name2, sizeof(Name2));
- format(str, sizeof(str), "PM To %s(ID %d): %s", Name2, id, str2);
- SendClientMessage(playerid, 0xFF0000FF, str);
- format(str, sizeof(str), "PM From %s(ID %d): %s", Name1, playerid, str2);
- SendClientMessage(id, 0xFF0000FF, str);
- }
- return 1;
- }
- CMD:vips(playerid, params[])
- {
- new count = 0, string[256];
- SendClientMessage(playerid, BLUE,"Current online helpers:");
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pVip] == 1)
- {
- format(string, sizeof(string),"Gold VIP:[%d] %s", i, PlayerName(i));
- SendClientMessage(playerid, BLUE, string);
- count++;
- }
- if(PlayerInfo[i][pVip] == 2)
- {
- format(string, sizeof(string),"Silver VIP:[%d] %s", i, PlayerName(i));
- SendClientMessage(playerid, BLUE, string);
- count++;
- }
- if(PlayerInfo[i][pVip] == 3)
- {
- format(string, sizeof(string),"Bronze VIP:[%d] %s", i, PlayerName(i));
- SendClientMessage(playerid, BLUE, string);
- count++;
- }
- }
- }
- if(count == 0)
- {
- SendClientMessage(playerid, BLUE,"No vips are online right now!");
- }
- return 1;
- }
- CMD:kill(playerid, params[])
- {
- SetPlayerHealth(playerid, 0);
- PlayerInfo[playerid][pDeaths]++;
- return true;
- }
- CMD:stats(playerid, params[])
- {
- new virworld = GetPlayerVirtualWorld(playerid); // %i
- new ip[64];
- GetPlayerIp(playerid, ip, sizeof(ip));
- new admin = PlayerInfo[playerid][pAdmin];
- new money = GetPlayerMoney(playerid);
- new skin = GetPlayerSkin(playerid);
- new score = PlayerInfo[playerid][pScore];
- new deaths = PlayerInfo[playerid][pDeaths];
- new kills = PlayerInfo[playerid][pKills];
- new car = GetPlayerVehicleID(playerid);
- new wantedlevel = PlayerInfo[playerid][pRank];
- new Float:armour;
- GetPlayerArmour(playerid, armour);
- new name[MAX_PLAYER_NAME+1];
- GetPlayerName(playerid, name, sizeof(name));
- new IP[16];
- GetPlayerIp(playerid, IP, sizeof(IP));
- new weapon = GetPlayerWeapon(playerid);
- new string[736];
- new coordsstring1[256];
- new coordsstring2[160];
- new coordsstring3[160];
- // new coordsstring4[160];
- format(coordsstring1, sizeof(coordsstring1), "\n{44A1D0}You Name: {FFFFFF}[%s] \n{44A1D0}Money: {FFFFFF}[$%d] \n\n{44A1D0}AdminLevel: {FFFFFF}[%d] \n{44A1D0}Skin: {FFFFFF}[%d] ", name,money,admin,skin);
- format(coordsstring2, sizeof(coordsstring2), "{44A1D0}Virworld: {FFFFFF}[%d] \n\n{44A1D0}Kills: {FFFFFF}[%d] \n{44A1D0}Deaths: {FFFFFF}[%d] \n\n{44A1D0}XP: {FFFFFF}[%i/1000] ", virworld,kills,deaths,wantedlevel);
- format(coordsstring3, sizeof(coordsstring3), "\n{44A1D0}Car ID: {FFFFFF}[%d] \n{44A1D0}Armour: {FFFFFF}[%0.f] {44A1D0}Level: {FFFFFF}[%d] \n{44A1D0}Weapon: {FFFFFF}[%d]", car,armour,score,weapon);
- // format(stats, sizeof stats, "%s", string1,string2);
- format(string, 736," %s%s%s%s",coordsstring1,coordsstring2,coordsstring3);
- ShowPlayerDialog(playerid, 13, DIALOG_STYLE_MSGBOX,"{00C0FF}Hello YouTube! ",string,"Close","");
- return true;
- }
- CMD:kick(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3) {
- new PID; //define the playerid we wanna kick
- new reason[64]; //the reason, put into a string
- new str[128]; //a new message string
- new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
- GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
- GetPlayerName(PID, Playername, sizeof(Playername));
- if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /kick [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
- if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
- return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
- format(str, sizeof(str), "'%s' has been kicked by administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
- SendClientMessageToAll(COLOR_RED, str); //send that message to all
- Kick(PID); //kick the playerid we've defined
- }
- else //if he has not got the permissions
- {
- SendClientMessage(playerid, COLOR_GREY, "You have to be level 3 to use that command!"); //return this message
- }
- return 1;
- }
- CMD:ban(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3) {
- new PID; //define the playerid we wanna ban
- new reason[64]; //the reason, put into a string
- new str[128]; //a new message string
- new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
- GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
- GetPlayerName(PID, Playername, sizeof(Playername));
- if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /ban [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
- if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
- return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
- format(str, sizeof(str), "'%s' has been banned by administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
- SendClientMessageToAll(COLOR_RED, str); //send that message to all
- PlayerInfo[PID][pBanned] = 1;
- Ban(PID); //Ban the playerid we've defined
- }
- else //if he has not got the permissions
- {
- SendClientMessage(playerid, COLOR_GREY, "You have to be level 5 to use that command!"); //return this message
- }
- return 1;
- }
- COMMAND:freeze(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 5)
- {
- new Target; //defines the playerid we wanna freeze
- if(sscanf(params, "u", Target)) SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /freeze [playerid]"); //tell sscanf again if the parameters/syntax is wrong to return a special message
- if(!IsPlayerConnected(Target)) //if the ID doesn't exist, return an error-message
- return SendClientMessage(playerid, COLOR_GREY, "ERROR:Player is not connected!");
- if(!sscanf(params, "u", Target))
- {
- if(Target == playerid) return SendClientMessage(playerid, COLOR_RED, "ERROR: Cant perform this command on yourself!" ); //I wouldn't add this line, because it won't let you perform this CMD on yourself
- if(PlayerInfo[Target][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid,red,"ERROR: You cant perform this on Admins that are higher than your level!"); // if the player you're performing this command on has a higher level as you, return a message, you ain't able to freeze him
- new tname[MAX_PLAYER_NAME]; //define the new target-name of the playerid
- GetPlayerName(Target,tname,sizeof(tname)); //get the playername with this function
- new pname[MAX_PLAYER_NAME]; //define the adminname
- GetPlayerName(playerid,pname,sizeof(pname)); //get the adminname with this function
- new tstring[128]; //define the string for the player (victim)
- new pstring[128];// define the string for the admin which is performing
- new astring[128];//define the string for all the players which are online
- format(tstring,sizeof(tstring),"You have been frozen by administrator %s! You cant move!",pname); //this is formatting the player-string, while it's also getting the adminname
- format(pstring,sizeof(pstring),"You have frozen player %s(%d)!",tname,Target); //this is formatting the adminname-string, while it's also getting the playername and his ID(target)
- format(astring,sizeof(astring),"Administrator %s has frozen %s!",pname,tname); //this is formatting the all-string, while it's sending this message to everybody and is getting admin- and playername
- SendClientMessage(Target,COLOR_GOLD,tstring);//sends the message to the victim
- SendClientMessage(playerid,TEAM_GROVE_COLOR,pstring);//sends the message to the admin
- SendClientMessageToAll(COLOR_LIGHTBLUE,astring);//sends the message to everybody
- TogglePlayerControllable(Target,0); //with that function, the player won't be able to mov, while we're using the variable "Target" as the playerid
- PlayerInfo[Target][Frozen] = 1;//IMPORTANT:we're getting the variable "[frozen]" out of the enum, and set it's value to "1', the compiler knows now that the player is frozen
- }
- }
- // if he doesn't have permissions, return that message!
- else return SendClientMessage(playerid,COLOR_RED,"ERROR: You must be level 5 to use this command!");
- return 1;
- }
- COMMAND:unfreeze(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 5)
- {
- new Target; //defines the playerid we wanna unfreeze
- if(sscanf(params, "u", Target)) SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /unfreeze [playerid]"); //tell sscanf again if the parameters/syntax is wrong to return a special message
- if(!IsPlayerConnected(Target)) //if the ID doesn't exist, return an error-message
- return SendClientMessage(playerid, COLOR_GREY, "ERROR:Player is not connected!");
- if(!sscanf(params, "u", Target))
- {
- if(Target == playerid) return SendClientMessage(playerid, COLOR_RED, "ERROR: Cant perform this command on yourself!" ); //I wouldn't add this line, because it won't let you perform this CMD on yourself
- if(PlayerInfo[Target][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid,red,"ERROR: You cant perform this on Admins that are higher than your level!"); // if the player you're performing this command on has a higher level as you, return a message, you ain't able to unfreeze him
- new tname[MAX_PLAYER_NAME]; //define the new target-name of the playerid
- GetPlayerName(Target,tname,sizeof(tname)); //get the playername with this function
- new pname[MAX_PLAYER_NAME]; //define the adminname
- GetPlayerName(playerid,pname,sizeof(pname)); //get the adminname with this function
- new tstring[128]; //define the string for the player (victim)
- new pstring[128];// define the string for the admin which is performing
- new astring[128];//define the string for all the players which are online
- format(tstring,sizeof(tstring),"You have been unfrozen by administrator %s! You cant move!",pname); //this is formatting the player-string, while it's also getting the adminname
- format(pstring,sizeof(pstring),"You have unfrozen player %s(%d)!",tname,Target); //this is formatting the adminname-string, while it's also getting the playername and his ID(target)
- format(astring,sizeof(astring),"Administrator %s has unfrozen %s!",pname,tname); //this is formatting the all-string, while it's sending this message to everybody and is getting admin- and playername
- SendClientMessage(Target,COLOR_GOLD,tstring);//sends the message to the victim
- SendClientMessage(playerid,TEAM_GROVE_COLOR,pstring);//sends the message to the admin
- SendClientMessageToAll(COLOR_LIGHTBLUE,astring);//sends the message to everybody
- TogglePlayerControllable(Target,1); //with that function, the player will be able to move again, while we're using the variable "Target" as playerid again
- PlayerInfo[Target][Frozen] = 0;//IMPORTANT:we're getting the variable "[frozen]" out of the enum, and set it's value to "0", the compiler knows now that the player is unfrozen
- }
- }
- // if he doesn't have permissions, return that message!
- else return SendClientMessage(playerid,COLOR_RED,"ERROR: You must be level 5 to use this command!");
- return 1;
- }
- CMD:ah(playerid,params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- SendClientMessage(playerid,COLOR_RED,"-- Commands: /kick - /ban - /goto - /gethere - /spec - /endspec --");
- SendClientMessage(playerid,COLOR_RED,"-- Commands: /warn - /unwarn - /ann - /cc - /aduty - /sethp --");
- SendClientMessage(playerid,COLOR_RED,"-- Commands: /givemoney - /setscore - /setarmour - /slap --");
- SendClientMessage(playerid,COLOR_RED,"-- Commands: /armourall -/healall - /freeze - /unfreeze --");
- SendClientMessage(playerid,COLOR_RED,"-- Commands: /giveweapon - /giveallcash - /giveallscore --");
- SendClientMessage(playerid,COLOR_RED,"-- Commands: /giveallweapon - /giveall - /setcash - /setxp --");
- SendClientMessage(playerid,COLOR_RED,"-- Commands: /setvip - /spawn - /explode - /sal - /setskin --");
- SendClientMessage(playerid,COLOR_RED,"-- Commands: /kickall - /unlock - /makeadmin - /unban - /setks --");
- return 1;
- }
- CMD:astop(playerid,params[])
- {
- StopAudioStreamForPlayer(playerid);
- return 1;
- }
- CMD:unlock(playerid,params[])
- {
- if( PlayerInfo[ playerid ][ pRank ] < 500 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: You need 500 XP! Type : /xp to see how to earn XP" );
- // if( PlayerInfo[ playerid ][ pKS ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: You killstreaks is alerdy unlocked. /information" );
- SendClientMessage(playerid,COLOR_RED,"--Information--");
- SendClientMessage(playerid,COLOR_RED,"--You can now use command /nuke--");
- ShowPlayerDialog(playerid, 8, DIALOG_STYLE_MSGBOX, "Killstreaks Unloced", "{DD0000}Killstreaks is now unlocket. You can now use /nuke.\n{006B00}You can use /nuke on players. (ID) Not on all players.\n\n\n{0000B6}Success Have Fun!", "Close", "");
- new string[64], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format(string,sizeof string,"%s can now use killstreaks.",pName);
- SendClientMessageToAll(COLOR_RED, string);
- PlayerInfo[playerid][pKS] = 1;
- if(PlayerInfo[playerid][pKS] < 1)
- {
- SendClientMessage(playerid, RED, "Alerdy unloced.");
- }
- return 1;
- }
- /*CMD:santahat(playerid)
- {
- SetPlayerAttachedObject(playerid, 3, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
- SendClientMessage(playerid, -1, "Merry X-mas");
- return 1;
- }
- */
- CMD:report(playerid, params[])
- {
- new player1, str[150], reason[66];
- if(sscanf(params,"ds[66]", player1, reason)) return SendClientMessage(playerid, RED,"[USAGE]: /report [playerid] [reason]");
- if(IsPlayerConnected(player1))
- {
- format(str, sizeof(str),"@New Report| Reporter: %s | Victim: %s | Reason: %s", PlayerName(playerid), PlayerName(player1), reason);
- MessageToAdmins(GREEN, str);
- SendClientMessage(playerid, YELLOW,"Your report has been sent to online administrators!");
- }
- else return SendClientMessage(playerid, RED,"[Server]: Player is not connected to this server!");
- return 1;
- }
- CMD:spawn(playerid, params[])
- {
- new player1;
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- if(IsPlayerConnected(player1))
- {
- new str[100];
- if(sscanf(params,"d",player1)) return SendClientMessage(playerid, RED,"[USAGE]: /spawn [playerid] ");
- SpawnPlayer(player1);
- format(str, sizeof(str),"Administrator %s has spawned you!", PlayerName(player1));
- SendClientMessage(player1, BLUE, str);
- // TargetCMDMessage(playerid, player1, "SPAWN");
- }
- else return SendClientMessage(playerid, RED,"[Server]: Player is not connected!");
- }
- // else return SendClientMessage(playerid, RED,"[Server]: You cannot use this command!");
- return 1;
- }
- CMD:explode(playerid, params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- new player1, Float:x, Float:y, Float:z, str[70];
- if(sscanf(params,"d", player1)) return SendClientMessage(playerid, RED,"[USAGE]: /explode [playerid] ");
- if(IsPlayerConnected(player1))
- {
- GetPlayerPos(player1, x, y, z);
- CreateExplosion(x, y, z, 7, 10.0);
- format(str, sizeof(str),"You have exploded %s!", PlayerName(player1));
- SendClientMessage(playerid, BLUE, str);
- // TargetCMDMessage(playerid, player1,"EXPLODE");
- }
- else return SendClientMessage(playerid, RED,"[Server]: Player is not connected!");
- }
- // else return SendClientMessage(playerid, RED,"[Server]: You need to be level 2 admin to use this command!");
- return 1;
- }
- CMD:setxp(playerid, params[])
- {
- new player1, amount;
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- if(sscanf(params,"dd", player1, amount)) return SendClientMessage(playerid, RED,"USAGE: /setxp [playerid][amount]");
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid, RED,"[Server]: Player not connected!");
- PlayerInfo[playerid][pRank] = amount;
- // TargetCMDMessage(playerid, player1,"SETKILLS");
- new str[100], str1[100];
- format(str, sizeof(str),"Administrator %s has setted your xp to %d", PlayerName(playerid),amount);
- format(str1, sizeof(str1),"You have setted %s's xp(s) to %d", PlayerName(player1), amount);
- SendClientMessage(player1, BLUE, str);
- SendClientMessage(playerid, BLUE, str1);
- }
- // else return SendClientMessage(playerid, RED,"[Server]: You need to be admin level 4 to use this command!");
- return 1;
- }
- CMD:setks(playerid, params[])
- {
- new player1, amount;
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- if(sscanf(params,"dd", player1, amount)) return SendClientMessage(playerid, RED,"USAGE: /setks [playerid][amount]");
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid, RED,"[Server]: Player not connected!");
- PlayerInfo[playerid][pKS] = amount;
- // TargetCMDMessage(playerid, player1,"SETKILLS");
- new str[100], str1[100];
- format(str, sizeof(str),"Administrator %s has setted your killstreak (unlock) to %d", PlayerName(playerid),amount);
- format(str1, sizeof(str1),"You have setted %s's killstreak (unlock) to %d", PlayerName(player1), amount);
- SendClientMessage(player1, BLUE, str);
- SendClientMessage(playerid, BLUE, str1);
- }
- // else return SendClientMessage(playerid, RED,"[Server]: You need to be admin level 4 to use this command!");
- return 1;
- }
- CMD:sal(playerid, params[])
- {
- new player1, amount;
- if( PlayerInfo[ playerid ][ pAdmin ] < 1338 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- if(sscanf(params,"dd", player1, amount)) return SendClientMessage(playerid, RED,"USAGE: /sal [playerid][admin level]");
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid, RED,"[Server]: Player not connected!");
- PlayerInfo[playerid][pAdmin] = amount;
- // TargetCMDMessage(playerid, player1,"SETKILLS");
- new str[100], str1[100];
- format(str, sizeof(str),"Administrator %s has setted your admin level to %d", PlayerName(playerid),amount);
- format(str1, sizeof(str1),"You have setted %s's admin level to %d", PlayerName(player1), amount);
- SendClientMessage(player1, BLUE, str);
- SendClientMessage(playerid, BLUE, str1);
- }
- // else return SendClientMessage(playerid, RED,"[Server]: You need to be admin level 4 to use this command!");
- return 1;
- }
- CMD:setvip(playerid, params[])
- {
- new player1, amount;
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- if(sscanf(params,"dd", player1, amount)) return SendClientMessage(playerid, RED,"USAGE: /setvip [playerid][amount]");
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid, RED,"[Server ERROR]: Player not connected!");
- PlayerInfo[playerid][pVip] = amount;
- // TargetCMDMessage(playerid, player1,"SETKILLS");
- new str[100], str1[100];
- format(str, sizeof(str),"Administrator %s has setted your VIP Level to %d", PlayerName(playerid),amount);
- format(str1, sizeof(str1),"You have setted %s's VIP level to %d", PlayerName(player1), amount);
- SendClientMessage(player1, BLUE, str);
- SendClientMessage(playerid, BLUE, str1);
- }
- // else return SendClientMessage(playerid, RED,"[Server]: You need to be admin level 4 to use this command!");
- return 1;
- }
- CMD:setcash(playerid, params[])
- {
- new player1, amount;
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- if(sscanf(params,"dd", player1, amount)) return SendClientMessage(playerid, RED,"USAGE: /setcash [playerid][amount]");
- if(!IsPlayerConnected(player1)) return SendClientMessage(playerid, RED,"[Server]: Player not connected!");
- GivePlayerMoney(player1, amount);
- // TargetCMDMessage(playerid, player1,"SETCASH");
- new str[100], str1[100];
- format(str, sizeof(str),"Administrator %s has setted your cash to $%d", PlayerName(playerid),amount);
- format(str1, sizeof(str1),"You have setted %s's cash to $%d", PlayerName(player1), amount);
- SendClientMessage(player1, BLUE, str);
- SendClientMessage(playerid, BLUE, str1);
- }
- // else return SendClientMessage(playerid, RED,"[Server]: You need to be admin level 4 to use this command!");
- return 1;
- }
- CMD:giveallcash(playerid, params[])
- {
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- new ammount;
- if(sscanf(params,"d", ammount)) return SendClientMessage(playerid, RED,"[USAGE]: /giveallcash [ammount]");
- if(IsPlayerConnected(i))
- {
- GivePlayerMoney(i, ammount);
- new str[150];
- format(str, sizeof(str),"Administrator %s has given everyone $%d money", PlayerName(playerid), ammount);
- SendClientMessage(i, BLUE, str);
- }
- }
- // else return SendClientMessage(playerid, RED,"[Server]: You are not high enough level to use this command!");
- }
- return 1;
- }
- CMD:giveallscore(playerid, params[])
- {
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- new ammount;
- if(sscanf(params,"d", ammount)) return SendClientMessage(playerid, RED,"[USAGE]: /giveallscore [ammount]");
- if(IsPlayerConnected(i))
- {
- SetPlayerScore(i, GetPlayerScore(i)+ammount);
- new str[150];
- format(str, sizeof(str),"Administrator %s has given everyone %d score(s)", PlayerName(playerid), ammount);
- SendClientMessage(i, BLUE, str);
- }
- }
- // else return SendClientMessage(playerid, RED,"[Server]: You are not high enough level to use this command!");
- }
- return 1;
- }
- CMD:giveallweapon(playerid, params[])
- {
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- new weapid, ammo;
- if(sscanf(params,"dd", weapid, ammo)) return SendClientMessage(playerid, RED,"[USAGE]: /giveallweapon [weapon] [ammo]");
- // if(IsValidWeapon(weapid))
- {
- if(IsPlayerConnected(i))
- {
- GivePlayerWeapon(i, weapid, ammo);
- new str[150];
- format(str, sizeof(str),"Administrator %s has given everyone %d ammo of weapon %d", PlayerName(playerid), ammo, weapid);
- SendClientMessage(i, BLUE, str);
- }
- }
- // else return SendClientMessage(playerid, RED,"[Server]: You are not allowed to give this weapon!");
- }
- // else return SendClientMessage(playerid, RED,"[Server]: You are not high enough level to use this command!");
- }
- return 1;
- }
- CMD:giveweapon(playerid, params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- new target, weapid, ammo;
- if(sscanf(params,"ddd", target, weapid, ammo)) return SendClientMessage(playerid, COLOR_RED,"[USAGE]: /giveweapon [playerid] [weapon] [ammo]");
- // if(IsValidWeapon(weapid))
- {
- if(IsPlayerConnected(target))
- {
- GivePlayerWeapon(target, weapid, ammo);
- new str[150];
- format(str, sizeof(str),"Administrator %s has given you %d ammo of weapon %d", PlayerName(playerid), ammo, weapid);
- SendClientMessage(target, BLUE, str);
- // TargetCMDMessage(playerid, target,"GIVEWEAPON");
- }
- else return SendClientMessage(playerid, COLOR_RED,"[Server]: Player is not connected!");
- }
- // else return SendClientMessage(playerid, COLOR_RED,"[Server]: You are not allowed to give this weapon!");
- }
- // else return SendClientMessage(playerid, COLOR_RED,"[Server]: You are not high enough level to use this command!");
- return 1;
- }
- CMD:admins(playerid, params[])
- {
- new count = 0, string[256];
- SendClientMessage(playerid, BLUE,"Current online admins:");
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pAdmin] >= 1)
- {
- format(string, sizeof(string),"Admin ID:[%d] %s Level: %d", i, PlayerName(i), PlayerInfo[i][pAdmin]);
- SendClientMessage(playerid, BLUE, string);
- count++;
- }
- }
- }
- if(count == 0)
- {
- SendClientMessage(playerid, BLUE,"No admins are online right now!");
- }
- return 1;
- }
- CMD:healall(playerid, params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- for(new i =0; i < MAX_PLAYERS; i ++ )
- {
- if(IsPlayerConnected(i))
- {
- SetPlayerHealth(i, 100.0);
- new str[100];
- format(str, sizeof(str),"Administrator %s has healed all players!", PlayerName(playerid));
- SendClientMessage(i, COLOR_WHITE, str);
- // CMDMessage(playerid,"HEALALL");
- }
- }
- }
- // else return SendClientMessage(playerid, RED,"[Server]: You need to be admin level 3 to use this command!");
- return 1;
- }
- CMD:goto(playerid, params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: You must be level 1 to use this command!" );
- new ID;
- new pn[MAX_PLAYER_NAME];
- new an[MAX_PLAYER_NAME];
- new str[128];
- if(sscanf(params, "u", ID)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /goto [ID]"); //This is a long line, "sscanf" is the plugin that search the missing params, "params" is the param that define params LOL, "u" is the PARAM that define the MISSING ID, ID is the param for the targetid
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: This player is not connected");//Same as !IsPlayerAdmin, but instead of "playerid" we put "ID" because it's the targetid
- GetPlayerName(playerid, an, MAX_PLAYER_NAME);//Define the playerid's param
- GetPlayerName(ID, pn, MAX_PLAYER_NAME);//Define the ID's param
- new Float:x; //Defining float X
- new Float:y; //Same
- new Float:z; //Same
- GetPlayerPos(ID, x, y, z); //This line get the "ID" position
- SetPlayerPos(playerid, x+1, y+1, z); //This line set the "playerid" position from "ID" position, with some changes(x+1, y+1);
- format(str, sizeof(str), "You have been teleported to %s", pn); //Showed before, this is the line that give the message to playerid)
- SendClientMessage(playerid, 0x00FF00AA, str); //This line give the message to playerid
- if(IsPlayerInAnyVehicle(playerid)) //Mhh, let's give you a question, what should this callback do?
- {
- GetPlayerPos(ID, x, y, z);
- SetVehiclePos(playerid, x+1, y+1, z); //And this one? :D
- }
- return 1;
- }
- CMD:makeadmin(playerid, params[])
- {
- new id, level, string[128], string2[128], name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME];
- if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessage(playerid, COLOR_RED, "Error : "COL_WHITE"You don't have the required level to execute this command");
- if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, COLOR_RED, "Error : "COL_WHITE"USAGE: /makeadmin [PartOfName/ID] [level]");
- if(level > 1338) return SendClientMessage(playerid, COLOR_RED, "Error : "COL_WHITE"Level cant be above 1338");
- if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Error : "COL_WHITE"That ID isn't connected");
- else
- {
- GetPlayerName(playerid, name, sizeof(name));
- GetPlayerName(id, name2, sizeof(name2));
- PlayerInfo[playerid][pAdmin] = level;
- format(string, sizeof(string), "Admin %s has promoted you to admin level %d", name, level);
- format(string2, sizeof(string2), "You have promoted %s to admin level %d", name2, level);
- SendClientMessage(id, GREEN, string);
- SendClientMessage(playerid, GREEN, string2);
- }
- return true;
- }
- CMD:unban(playerid, params[])
- {
- new name[MAX_PLAYER_NAME], IP[16], str[64], str1[128];
- if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_RED, "Error : "COL_WHITE"You don't have the required level to execute this command");
- if(sscanf(params, "s[16]", IP)) return SendClientMessage(playerid, COLOR_RED, "Error : "COL_WHITE"Uncorrect format. /unban [IP]");
- GetPlayerName(playerid, name, sizeof(name));
- format(str, sizeof(str), "unbanip %s", IP);
- SendRconCommand(str);
- format(str1, sizeof(str1), "You unbanned IP: "COL_WHITE"%s", IP);
- SendClientMessage(playerid, GREEN, str1);
- SendRconCommand("reloadbans");
- return true;
- }
- CMD:gethere(playerid,params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- new targetid, Float:x, Float:y, Float:z;//defines floats and [U]targetid(same which we did as id above)[/U]
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /gethere [id]");//checks if there is something written after /gethere if no sends the usage error
- if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "This player is offline or it is yourself");//checks if the player is conneted or not and also checks that we are not teleporting ourselves to our self :P if we are it sends error
- GetPlayerPos(playerid, x, y, z);//gets player pos PLAYER POS not targetid
- SetPlayerPos(targetid, x+1, y+1, z);//gets the TARGETID player to the PLAYERID x+1,y+1 and z remains same as it defines height
- return 1;
- }
- CMD:myrank(playerid, params[])
- {
- if(PlayerInfo[playerid][pRank] >= 0 && PlayerInfo[playerid][pRank] >= 100)
- {
- SendClientMessage(playerid, COLOR_RED,"Private 1");
- }
- if(PlayerInfo[playerid][pRank] >= 100 && PlayerInfo[playerid][pRank] >= 200)
- {
- SendClientMessage(playerid, COLOR_RED,"Private 2");
- }
- if(PlayerInfo[playerid][pRank] >= 200 && PlayerInfo[playerid][pRank] >= 300)
- {
- SendClientMessage(playerid, COLOR_RED,"Head Staff Sergeant");
- }
- if(PlayerInfo[playerid][pRank] >= 300 && PlayerInfo[playerid][pRank] >= 400)
- {
- SendClientMessage(playerid, COLOR_RED,"Head Sergeant Major");
- }
- if(PlayerInfo[playerid][pRank] >= 400 && PlayerInfo[playerid][pRank] >= 500)
- {
- SendClientMessage(playerid, COLOR_RED,"Captain 1");
- }
- if(PlayerInfo[playerid][pRank] >= 500 && PlayerInfo[playerid][pRank] >= 600)
- {
- SendClientMessage(playerid, COLOR_RED,"Captain 2");
- }
- if(PlayerInfo[playerid][pRank] >= 600 && PlayerInfo[playerid][pRank] >= 700)
- {
- SendClientMessage(playerid, COLOR_RED,"Captain 3");
- }
- if(PlayerInfo[playerid][pRank] >= 700 && PlayerInfo[playerid][pRank] >= 800)
- {
- SendClientMessage(playerid, COLOR_RED,"Major General");
- }
- if(PlayerInfo[playerid][pRank] >= 800 && PlayerInfo[playerid][pRank] >= 900)
- {
- SendClientMessage(playerid, COLOR_RED,"Head General");
- }
- if(PlayerInfo[playerid][pRank] >= 900 && PlayerInfo[playerid][pRank] >= 1000)
- {
- SendClientMessage(playerid, COLOR_RED,"Commander");
- }
- return 1;
- }
- CMD:ann(playerid,params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- new text[60];
- if(sscanf(params,"s[60]",text))
- return SendClientMessage(playerid, 0xFF0000, "Usage: /ann(ounce) [text]");
- GameTextForAll(text,3000,3);
- return 1;
- }
- COMMAND:givemoney(playerid, params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- new
- toplayerid, // the player we want to give money to
- amount;
- // extracting player's ID and amount from params
- if (!sscanf(params, "ii", toplayerid, amount))
- {
- if (toplayerid != INVALID_PLAYER_ID)
- {
- new
- message[40];
- GivePlayerMoney(toplayerid, amount);
- format(message, sizeof(message), "You got $%d from admin!", amount);
- SendClientMessage(toplayerid, 0x00FF00FF, message);
- }
- else SendClientMessage(playerid, 0xFF0000FF, "That player is not connected");
- }
- else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /givemoney <playerid> <amount>");
- }
- // else SendClientMessage(playerid, 0xFF0000FF, "Only admins can use this command!");
- return 1;
- }
- COMMAND:setscore(playerid, params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- new
- toplayerid, // the player we want to give money to
- amount;
- // extracting player's ID and amount from params
- if (!sscanf(params, "ii", toplayerid, amount))
- {
- if (toplayerid != INVALID_PLAYER_ID)
- {
- new
- message[40];
- SetPlayerScore(toplayerid, amount);
- format(message, sizeof(message), "Admin has set you score to %d", amount);
- SendClientMessage(toplayerid, 0x00FF00FF, message);
- }
- else SendClientMessage(playerid, 0xFF0000FF, "That player is not connected");
- }
- else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /setscore <playerid> <amount>");
- }
- // else SendClientMessage(playerid, 0xFF0000FF, "Only admins can use this command!");
- return 1;
- }
- COMMAND:setskin(playerid, params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- new
- toplayerid, // the player we want to give money to
- amount;
- // extracting player's ID and amount from params
- if (!sscanf(params, "ii", toplayerid, amount))
- {
- if (toplayerid != INVALID_PLAYER_ID)
- {
- new
- message[40];
- SetPlayerSkin(toplayerid, amount);
- format(message, sizeof(message), "Admin has set you skin to %d", amount);
- SendClientMessage(toplayerid, 0x00FF00FF, message);
- }
- else SendClientMessage(playerid, 0xFF0000FF, "That player is not connected");
- }
- else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /setskin <playerid> <amount>");
- }
- // else SendClientMessage(playerid, 0xFF0000FF, "Only admins can use this command!");
- return 1;
- }
- COMMAND:sethp(playerid, params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- new
- toplayerid, // the player we want to give money to
- amount;
- // extracting player's ID and amount from params
- if (!sscanf(params, "ii", toplayerid, amount))
- {
- if (toplayerid != INVALID_PLAYER_ID)
- {
- new
- message[40];
- SetPlayerHealth(toplayerid, amount);
- format(message, sizeof(message), "Admin has set you health to %d", amount);
- SendClientMessage(toplayerid, 0x00FF00FF, message);
- }
- else SendClientMessage(playerid, 0xFF0000FF, "That player is not connected");
- }
- else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /sethp <playerid> <amount>");
- }
- // else SendClientMessage(playerid, 0xFF0000FF, "Only admins can use this command!");
- return 1;
- }
- COMMAND:setarmour(playerid, params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- new
- toplayerid, // the player we want to give money to
- amount;
- // extracting player's ID and amount from params
- if (!sscanf(params, "ii", toplayerid, amount))
- {
- if (toplayerid != INVALID_PLAYER_ID)
- {
- new
- message[40];
- SetPlayerArmour(toplayerid, amount);
- format(message, sizeof(message), "Admin has set you armour to %d", amount);
- SendClientMessage(toplayerid, 0x00FF00FF, message);
- }
- else SendClientMessage(playerid, 0xFF0000FF, "That player is not connected");
- }
- else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /setarmour <playerid> <amount>");
- }
- // else SendClientMessage(playerid, 0xFF0000FF, "Only admins can use this command!");
- return 1;
- }
- CMD:armourall(playerid, params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- for(new i =0; i < MAX_PLAYERS; i ++ )
- {
- if(IsPlayerConnected(i))
- {
- SetPlayerArmour(i, 100.0);
- new str[100];
- format(str, sizeof(str),"Administrator %s has armoured all players!", PlayerName(playerid));
- SendClientMessage(i, COLOR_RED, str);
- // CMDMessage(playerid,"ARMOURALL");
- }
- }
- }
- // else return SendClientMessage(playerid, COLOR_RED,"[ADMIN]: You need to be admin level 3 to use this command!");
- return 1;
- }
- CMD:kickall(playerid, params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- for(new i =0; i < MAX_PLAYERS; i ++ )
- {
- if(IsPlayerConnected(i))
- {
- //Kick(i);
- new str[100];
- format(str, sizeof(str),"Administrator %s has kicked all players!", PlayerName(playerid));
- SendClientMessage(i, COLOR_RED, str);
- Kick(i);
- // CMDMessage(playerid,"ARMOURALL");
- }
- }
- }
- // else return SendClientMessage(playerid, COLOR_RED,"[ADMIN]: You need to be admin level 3 to use this command!");
- return 1;
- }
- CMD:slap(playerid, params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: This command is only for admins!" );
- {
- new player1, Float:x, Float:y, Float:z, str[70];
- if(sscanf(params,"d", player1)) return SendClientMessage(playerid, COLOR_RED,"[USAGE]: /slap [playerid] ");
- if(IsPlayerConnected(player1))
- {
- GetPlayerPos(player1, x, y, z);
- SetPlayerPos(player1, x, y, z+6);
- format(str, sizeof(str),"You have slapped %s!", PlayerName(player1));
- SendClientMessage(playerid, COLOR_WHITE, str);
- // TargetCMDMessage(playerid, player1,"SLAP");
- PlayerPlaySound(player1,1190,0.0,0.0,0.0);
- PlayerPlaySound(playerid,1190,0.0,0.0,0.0);
- }
- else return SendClientMessage(playerid, COLOR_RED,"[Server]: Player is not connected!");
- }
- // else return SendClientMessage(playerid, COLOR_RED,"[ADMIN]: You need to be level 2 admin to use this command!");
- return 1;
- }
- CMD:aduty(playerid) //Doesnt need params function
- {
- if(PlayerInfo[playerid][pAdmin] >=1 || IsPlayerAdmin(playerid)) //If you use rcon admin delete (PlayerInfo[playerid][pAdmin] >=1 ||
- {
- if (aDuty[playerid] == 0) //Check if player is on duty
- {
- new string[128];
- new Float:x,Float:y,Float:z;
- new Text3D:label = Create3DTextLabel("Admin On Duty!", COLOR_DRED,x,y,z, 40.0, 0, 0); //Creates 3d text label at player position
- GetPlayerPos(playerid,x,y,z); //Looks for players position
- SetPlayerHealth(playerid, 10000000000000.0);
- SetPlayerColor(playerid,COLOR_DRED); //set admin colour red
- SetPlayerSkin(playerid,294); //set admin skin to 294
- format(string,sizeof(string), "%s is now on admin Duty!",GetPlayerNameEx(playerid)); //here you format string to send to players
- SendClientMessageToAll(COLOR_DRED,string); //send string to players
- SendClientMessage(playerid,COLOR_DRED,"You are now on duty!"); //Tell admin he is now on duty
- Attach3DTextLabelToPlayer(label,playerid,0.0, 0.0, 0.7); //attach 3d text label made before to player
- aDuty[playerid] = 1; //Set player on duty
- }
- else if (aDuty[playerid] == 1) //Check if player is on duty
- {
- new string[128];
- new Float:x,Float:y,Float:z;
- new Text3D:label = Create3DTextLabel("Admin On Duty!", COLOR_DRED,x,y,z, 40.0, 0, 0);
- Delete3DTextLabel(label); //Delete 3d text label saying "Admin On Duty!"
- SetPlayerHealth(playerid,100); //sets player health back to 100
- format(string,sizeof(string)," %s is now off admin Duty!",GetPlayerNameEx(playerid)); //Format string to send to players
- SendClientMessageToAll(COLOR_DRED,string); //send players string
- SendClientMessage(playerid, COLOR_DRED,"You are now off duty!"); //send admin message he is off duty
- aDuty[playerid] = 0; //sets admin off duty
- }
- }
- else
- SendClientMessage(playerid,COLOR_DRED,"You are not high level enough!"); //Error message to send to players who arent admins
- return 1;
- }
- COMMAND:cc( playerid, params[ ] )
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: You must be level 1 to use this command!" );
- {
- for( new i = 0; i <= 100; i ++ ) SendClientMessageToAll( COLOR_WHITE, "" );
- }
- return 1;
- }
- COMMAND:spec(playerid,params[])
- {
- new zid;
- if(sscanf(params, "u", zid)) return SendClientMessage(playerid, 0xFF0000AA, "Usae: /spec [playerid]");
- if(IsPlayerConnected(zid))
- {
- if(PlayerInfo[playerid][pAdmin] >= 1) //return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You are not admin.");
- {
- TogglePlayerSpectating(playerid, 1);
- if(IsPlayerInAnyVehicle(zid))
- {
- PlayerSpectateVehicle(playerid,GetPlayerVehicleID(zid), SPECTATE_MODE_NORMAL);
- }
- else
- {
- PlayerSpectatePlayer(playerid, zid, SPECTATE_MODE_NORMAL);
- }
- SendClientMessage(playerid, COLOR_RED, "{FBDF89}[Server] You spec the player. To stop spec /endspec");
- }
- // else SendClientMessage(playerid, COLOR_RED, "[FunZoneLT]>> Jus negalite naudoti sitos komandos.");
- }
- else SendClientMessage(playerid, COLOR_RED, "[Server] Player not Connected to server (Invalid ID).");
- return 1;
- }
- COMMAND:endspec(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1) //return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You are not admin.");
- #pragma unused params
- TogglePlayerSpectating(playerid, 0);
- return 1;
- }
- COMMAND:xp(playerid,params[])
- {
- new xp = PlayerInfo[playerid][pRank];
- new string[64], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format(string,sizeof string,"%s you XP is: [%i]. You earn 1 XP+ after evry kill. You don't loose XP!",pName, xp);
- SendClientMessage(playerid, COLOR_RED, string);
- return 1;
- }
- CMD:warn(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3) {
- new PID; //define the playerid we wanna kick
- new reason[64]; //the reason, put into a string
- new str[128]; //a new message string
- new warn = PlayerInfo[playerid][pWarn]; // How many warns
- new warns[128];
- new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
- GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
- GetPlayerName(PID, Playername, sizeof(Playername));
- if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /warn [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
- if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
- return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
- if(PlayerInfo[PID][pWarn] >= 3) return SendClientMessage(playerid, COLOR_RED, "This player have 3 warns.");
- format(str, sizeof(str), "'%s' has been warned and kicked by administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
- format(warns, sizeof(warns), "'%s' You have [%d/3] warns right now. After 3 warns you will be banned. ", Playername, warn);
- SendClientMessageToAll(COLOR_RED, str); //send that message to all
- SendClientMessage(PID, COLOR_RED, warns);
- PlayerInfo[PID][pWarn]++; //kick the playerid we've defined
- Kick(PID);
- }
- else //if he has not got the permissions
- {
- SendClientMessage(playerid, COLOR_GREY, "You have to be level 3 to use that command!"); //return this message
- }
- return 1;
- }
- CMD:unwarn(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3) {
- new PID; //define the playerid we wanna kick
- new reason[64]; //the reason, put into a string
- new str[128]; //a new message string
- new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
- GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
- GetPlayerName(PID, Playername, sizeof(Playername));
- if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /warn [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
- if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
- return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
- if(PlayerInfo[PID][pWarn] >= 3) return SendClientMessage(playerid, COLOR_RED, "This player have 3 warns.");
- format(str, sizeof(str), "'%s' has been unwarned by administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
- SendClientMessageToAll(COLOR_RED, str); //send that message to all
- PlayerInfo[PID][pWarn]--; //kick the playerid we've defined
- }
- else //if he has not got the permissions
- {
- SendClientMessage(playerid, COLOR_GREY, "You have to be level 3 to use that command!"); //return this message
- }
- return 1;
- }
- COMMAND:accinfo(playerid,params[])
- {
- new warns = PlayerInfo[playerid][pWarn];
- new string[64], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format(string,sizeof string,"%s you have [%d/3] Warns",pName, warns);
- SendClientMessage(playerid, COLOR_RED, string);
- return 1;
- }
- COMMAND:resstats(playerid,params[])
- {
- PlayerInfo[playerid][pKills] = 0;
- PlayerInfo[playerid][pDeaths] = 0;
- SendClientMessage(playerid, COLOR_GREY, "You kills/deaths is now reseted to 0.");
- return 1;
- }
- COMMAND:nuke(playerid, params[])
- {
- new pname[24], oname[24], otherid;
- GetPlayerName(playerid,pname,24);
- GetPlayerName(otherid,oname,24);
- if( PlayerInfo[ playerid ][ pKS ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: You need to unlock the killstreaks first /unlock" );
- else{
- if(sscanf(params,"d",otherid)) return SendClientMessage(playerid,0xFF0000AA,"USAGE: /nuke [playerid]");
- if(!IsPlayerConnected(otherid)) return SendClientMessage(playerid,0xFF0000AA,"Player is not online!");
- GivePlayerMoney(playerid,-30000);
- SendClientMessage(otherid,0xFF0000AA,"You have been killed by Nuke!");
- GetPlayerPos(otherid,bombx,bomby,bombz);
- bomb = CreateObject(3786,bombx,bomby,bombz + 80,0,269,0,100);
- MoveObject(bomb,bombx,bomby,bombz - 5 ,28);
- SetTimer("hittar",2500,false);
- }
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == sniper)
- {
- SendClientMessage(playerid, COLOR_RED, "Server gived a sniper to you!");
- GivePlayerWeapon(playerid, 34, 20);
- }
- if(pickupid == sniper1)
- {
- SendClientMessage(playerid, COLOR_RED, "Server gived a sniper to you!");
- GivePlayerWeapon(playerid, 34, 20);
- }
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)//This is called when a player's interior is changed.
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate( playerid )
- {
- new string[ 128 ];
- if(PlayerInfo[playerid][pRank] >= 1000)
- {
- TRank = "6"; /// The rank name
- TextDrawSetString(Textdraw2, string);
- }
- else if(PlayerInfo[playerid][pRank] >= 700 && PlayerInfo[playerid][pRank] >= 1000)
- {
- TRank = "5"; /// The rank name
- TextDrawSetString(Textdraw2, string);
- }
- else if(PlayerInfo[playerid][pRank] >= 500 && PlayerInfo[playerid][pRank] >= 700)
- {
- TRank = "4"; /// The rank name
- TextDrawSetString(Textdraw2, string);
- }
- else if(PlayerInfo[playerid][pRank] >= 200 && PlayerInfo[playerid][pRank] >= 500)
- {
- TRank = "3"; /// The rank name
- TextDrawSetString(Textdraw2, string);
- }
- else if(PlayerInfo[playerid][pRank] >= 100 && PlayerInfo[playerid][pRank] >= 200)
- {
- TRank = "2"; /// The rank name
- TextDrawSetString(Textdraw2, string);
- }
- else if(PlayerInfo[playerid][pRank] >= 50 && PlayerInfo[playerid][pRank] >= 100)
- {
- TRank = "1"; /// The rank name
- TextDrawSetString(Textdraw2, string);
- }
- else if(PlayerInfo[playerid][pRank] >= 0 && PlayerInfo[playerid][pRank] >= 50)
- {
- TRank = "0"; /// The rank name
- TextDrawSetString(Textdraw2, string);
- }
- format( string, sizeof string, "~y~Rank:~w~ %s",TRank);
- TextDrawSetString(Textdraw2, string);
- TextDrawShowForPlayer( playerid, Textdraw2 );
- if(PlayerInfo[playerid][pRank] >= 0 && PlayerInfo[playerid][pRank] >= 50)
- {
- PlayerInfo[playerid][pScore] = 1;
- }
- if(PlayerInfo[playerid][pRank] >= 50 && PlayerInfo[playerid][pRank] >= 100)
- {
- PlayerInfo[playerid][pScore] = 2;
- }
- if(PlayerInfo[playerid][pRank] >= 100 && PlayerInfo[playerid][pRank] >= 200)
- {
- PlayerInfo[playerid][pScore] = 3;
- }
- if(PlayerInfo[playerid][pRank] >= 200 && PlayerInfo[playerid][pRank] >= 300)
- {
- PlayerInfo[playerid][pScore] = 4;
- }
- if(PlayerInfo[playerid][pRank] >= 300 && PlayerInfo[playerid][pRank] >= 400)
- {
- PlayerInfo[playerid][pScore] = 5;
- }
- if(PlayerInfo[playerid][pRank] >= 400 && PlayerInfo[playerid][pRank] >= 500)
- {
- PlayerInfo[playerid][pScore] = 6;
- }
- if(PlayerInfo[playerid][pRank] >= 500 && PlayerInfo[playerid][pRank] >= 600)
- {
- PlayerInfo[playerid][pScore] = 7;
- }
- if(PlayerInfo[playerid][pRank] >= 600 && PlayerInfo[playerid][pRank] >= 700)
- {
- PlayerInfo[playerid][pScore] = 8;
- }
- if(PlayerInfo[playerid][pRank] >= 700 && PlayerInfo[playerid][pRank] >= 800)
- {
- PlayerInfo[playerid][pScore] = 9;
- }
- if(PlayerInfo[playerid][pRank] >= 800 && PlayerInfo[playerid][pRank] >= 900)
- {
- PlayerInfo[playerid][pScore] = 10;
- }
- if(PlayerInfo[playerid][pRank] >= 900 && PlayerInfo[playerid][pRank] >= 1000)
- {
- PlayerInfo[playerid][pScore] = 99;
- SendClientMessage(playerid, COLOR_RED, "You are level 99. You can now use/unlock killstreaks");
- }
- if(PlayerInfo[playerid][pWarn] >= 3)
- {
- SendClientMessage(playerid, COLOR_RED, "You are banned from the server. Reason: +3 Warns");
- Ban(playerid);
- }
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- 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_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
- 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",0);
- INI_WriteInt(File,"Banned",0);
- INI_WriteInt(File,"Rank",0);
- INI_WriteInt(File,"Warns",0);
- INI_WriteInt(File,"Muted",0);
- INI_WriteInt(File,"MuteTime",0);
- INI_WriteInt(File,"Vip",0);
- INI_WriteInt(File,"Map",0);
- INI_WriteInt(File,"Killstreak",0);
- INI_Close(File);
- SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
- SpawnPlayer(playerid);
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Great! Your Y_INI system works perfectly. Relog to save your stats!","Ok","");
- Kick(playerid);
- }
- }
- 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]);
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
- }
- return 1;
- }
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- public AntiSpawnkill(playerid)
- {
- SetPlayerHealth(playerid, 100.0);
- SetPlayerHealth(playerid, 100.0);
- SendClientMessage(playerid, 0xFF0000AA, "[INFO]:Anti-Spawnkill protection over, you are on your own now");
- return 1;
- }
- public Map(playerid)
- {
- PlayerInfo[playerid][pMap] = 1;
- SetPlayerPos(playerid, 2527.72,2729.96,10.8203);
- SetPlayerWeather(playerid, 0);
- SetPlayerTime(playerid, 13,00);
- SetTimerEx("rSpawn", 600000,0,"i",playerid);
- return 1;
- }
- public Radio(playerid)
- {
- PlayAudioStreamForPlayer(playerid, "http://k003.kiwi6.com/hotlink/fq3a505z9r/jokers_of_the_scene_baggy_bottom_boys_official_video_www.mp3fiber.com_.mp3");
- SetTimerEx("Radio1", 240000,0,"i",playerid);
- return 1;
- }
- public Radio1(playerid)
- {
- PlayAudioStreamForPlayer(playerid, "http://k003.kiwi6.com/hotlink/1eegzeh272/deadmau5_-_ghosts_n_stuff_www.mp3fiber.com_.mp3");
- SetTimerEx("Radio1", 360000,0,"i",playerid);
- return 1;
- }
- public rSpawn(playerid)
- {
- PlayerInfo[playerid][pMap] = 0;
- SpawnPlayer(playerid);
- SendClientMessage(playerid, BLUE, "[Information] [Server:] The Game is Over.");
- return 1;
- }
- public Spec(playerid)
- {
- TogglePlayerSpectating(playerid, 0);
- SpawnPlayer(playerid);
- return 1;
- }
- stock GetPlayerNameEx(playerid) //This is stock i made to make Getting players name easier
- {
- new Name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
- return Name;
- }
- stock PlayerName(playerid)
- {
- new pName[25];
- GetPlayerName(playerid, pName, sizeof(pName));
- return pName;
- }
- stock MessageToAdmins(color, const string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pAdmin] >= 1)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- return 1;
- }
- public hittar()
- {
- CreateExplosion(bombx,bomby,bombz,6,10.0);
- CreateExplosion(bombx,bomby,bombz+5,6,10.0);
- CreateExplosion(bombx,bomby,bombz+10,6,10.0);
- CreateExplosion(bombx+10,bomby,bombz,6,10.0);
- CreateExplosion(bombx-10,bomby,bombz,6,10.0);
- CreateExplosion(bombx+10,bomby+10,bombz,6,10.0);
- CreateExplosion(bombx+10,bomby+10,bombz,6,10.0);
- CreateExplosion(bombx-10,bomby+10,bombz,6,10.0);
- CreateExplosion(bombx-10,bomby+10,bombz,6,10.0);
- DestroyObject(bomb);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement