Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- †††††††††††††††† [GunGame System V 2.1] ††††††††††††††††
- Good Luck With It !
- ***********************************
- *** Created By [R]amin_ **
- *** khramin78@gmail.com **
- *** Mobin.dfer@yahoo.com **
- ***********************************
- I Hope This Gun Game FilterScript Will be usefull for you
- †††††††††††††††† [GunGame System V 2.1] ††††††††††††††††
- credits to :
- [R]amin_
- Zeex
- Y_Less
- */
- /*
- You Can Use These If You Want
- PlayerPlaySound(playerid,1068,0.0,0.0,0.0); duel start
- PlayerPlaySound(playerid,1069,0.0,0.0,0.0); duel stop
- PlayerPlaySound(playerid,1097,0.0,0.0,0.0); winner start
- PlayerPlaySound(playerid,1098,0.0,0.0,0.0); winner stop
- PlayerPlaySound(playerid,1083,0.0,0.0,0.0); Select Dialog
- */
- #include <a_samp>
- #include <sscanf2>
- #include <Zcmd>
- #define FILTERSCRIPT
- #define COLOR_RED 0xAA3333AA
- #define COLOR_LIGHTRED 0xFF6347AA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COL_WHITE "{FFFFFF}"
- #define COL_RED "{F81414}"
- #define COL_YELLOW "{F3FF02}"
- #define COL_LRED "{FFA1A1}"
- #define Dialog_GunGame 2001
- #define Dialog_GGBase 2002
- #define Dialog_GGArmor 2003
- #define Dialog_GGPrize 2004
- #define Dialog_GGPLimit 2005
- forward GunGamePrepare();
- forward GunGameStart();
- forward GunGameEnd();
- new PlayerGGKills[MAX_PLAYERS];
- new GGWinnerID = 999;
- new GGWinnerKills;
- new GGPlayers;
- new GGWinnerPrize;
- new bool:GGArmored;
- new bool:GGStarted;
- new bool:IsInGG[MAX_PLAYERS];
- new bool:IsGGHuge;
- new bool:IsAnyGG;
- new bool:IsGGNormal;
- new bool:IsGGSmall;
- new bool:IsSpecingGG[MAX_PLAYERS];
- new GGPlayerLimit;
- new PlayerGGWeapon[MAX_PLAYERS];
- new GGAdminid = 999;
- new GGPreTimer;
- new GGSkins[] =
- {
- 137,
- 181,
- 212
- };
- new Float:GGHugeSp[][] =
- {
- {-1365.6370,931.1339,1036.3071,352.7964},
- {-1311.4410,946.0482,1036.4771,32.5589},
- {-1275.4701,995.0630,1037.2329,85.5754},
- {-1303.2987,1040.6611,1038.0431,143.2554},
- {-1303.2987,1040.6611,1038.0431,143.2554},
- {-1279.7277,1007.9163,1037.4525,91.4661},
- {-1347.5392,1056.2308,1038.3749,165.4683},
- {-1406.7548,1059.8137,1038.5405,188.4176},
- {-1406.7548,1059.8137,1038.5405,188.4176},
- {-1363.5107,1059.4454,1038.4613,168.4137},
- {-1443.3496,1057.9875,1038.5675,195.9038},
- {-1482.1045,1047.2584,1038.4646,214.5578},
- {-1515.5001,1009.6786,1037.8917,262.5427},
- {-1511.8203,971.4282,1037.2567,297.6416},
- {-1482.3848,948.8790,1036.7982,331.0224},
- {-1462.9504,934.6046,1036.5898,342.3129},
- {-1443.3665,933.4116,1036.4974,353.3582},
- {-1424.1276,932.0661,1036.4058,357.4079},
- {-1389.7131,935.9854,1036.4299,8.6986},
- {-1440.0103,996.4330,1024.1982,87.2415},
- {-1393.7437,997.6558,1024.1277,179.9061},
- {-1346.6505,998.0483,1024.0538,269.9061}
- };
- new Float:GGNormalSp[][] =
- {
- {-1486.5941,1567.7218,1052.5313,319.5384},
- {-1494.0847,1563.3784,1052.5313,358.0213},
- {-1487.4187,1634.1917,1052.5313,273.0966},
- {-1452.7310,1628.3412,1054.4141,273.1483},
- {-1418.4728,1615.4061,1052.5313,279.7754},
- {-1395.5817,1653.1403,1052.5313,184.5419},
- {-1359.2196,1638.7040,1053.1034,258.4213},
- {-1374.7731,1623.2323,1052.5313,93.0255},
- {-1352.6407,1580.1671,1052.5313,168.5005},
- {-1377.2875,1561.7327,1052.5313,2.3683},
- {-1431.1586,1580.7185,1052.5313,243.6946},
- {-1431.0129,1580.8337,1055.7191,357.0211}
- };
- new Float:GGSmallSp[][] =
- {
- {-1401.6968,107.1886,1032.2734,184.1404},
- {-1384.2694,127.4698,1030.7107,134.1920},
- {-1387.5258,84.2175,1031.0518,27.6681},
- {-1425.6036,82.0811,1031.1155,301.2708},
- {-1419.6563,127.9759,1030.7197,221.3775}
- };
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" This FilterScript Has Been Made By [R]amin_");
- print(" Conntect me on :");
- print(" khramin78@gmail.com");
- print(" mobin.dfer@yahoo.com");
- print("--------------------------------------\n");
- GGStarted = false;
- IsAnyGG = false;
- GGArmored = false;
- IsGGHuge = false;
- IsGGSmall = false;
- IsGGNormal = false;
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #endif
- public OnPlayerConnect(playerid)
- {
- IsInGG[playerid] = false;
- PlayerGGKills[playerid] = 0;
- PlayerGGWeapon[playerid] = 999;
- IsSpecingGG[playerid] = false;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- if(IsInGG[playerid] == true)
- {
- GGPlayers--;
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(IsInGG[playerid] == true)
- {
- new RandomSkin = random(sizeof(GGSkins));
- if(IsGGHuge == true)
- {
- new RandomSpawn = random(sizeof(GGHugeSp));
- SetPlayerInterior(playerid,15);
- SetPlayerSkin(playerid,GGSkins[RandomSkin]);
- SetPlayerPos(playerid,GGHugeSp[RandomSpawn][0],GGHugeSp[RandomSpawn][1],GGHugeSp[RandomSpawn][2]);
- SetPlayerFacingAngle(playerid,GGHugeSp[RandomSpawn][3]);
- SetPlayerHealth(playerid,100.0);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid,PlayerGGWeapon[playerid],99999);
- if(GGArmored == true)
- {
- SetPlayerArmour(playerid,50.0);
- }
- }
- if(IsGGNormal == true)
- {
- new RandomSpawn = random(sizeof(GGNormalSp));
- SetPlayerInterior(playerid,14);
- SetPlayerSkin(playerid,GGSkins[RandomSkin]);
- SetPlayerPos(playerid,GGNormalSp[RandomSpawn][0],GGNormalSp[RandomSpawn][1],GGNormalSp[RandomSpawn][2]);
- SetPlayerFacingAngle(playerid,GGNormalSp[RandomSpawn][3]);
- SetPlayerHealth(playerid,100.0);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid,PlayerGGWeapon[playerid],99999);
- if(GGArmored == true)
- {
- SetPlayerArmour(playerid,50.0);
- }
- }
- if(IsGGSmall == true)
- {
- new RandomSpawn = random(sizeof(GGSmallSp));
- SetPlayerInterior(playerid,1);
- SetPlayerSkin(playerid,GGSkins[RandomSkin]);
- SetPlayerPos(playerid,GGSmallSp[RandomSpawn][0],GGSmallSp[RandomSpawn][1],GGSmallSp[RandomSpawn][2]);
- SetPlayerFacingAngle(playerid,GGSmallSp[RandomSpawn][3]);
- SetPlayerHealth(playerid,100.0);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid,PlayerGGWeapon[playerid],99999);
- if(GGArmored == true)
- {
- SetPlayerArmour(playerid,50.0);
- }
- }
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(IsInGG[killerid] == true)
- {
- new string[128],pName[MAX_PLAYER_NAME];
- GetPlayerName(killerid,pName,sizeof(pName));
- PlayerGGKills[killerid]++;
- if(PlayerGGKills[killerid] == 5)
- {
- ResetPlayerWeapons(killerid);
- PlayerPlaySound(playerid,1138,0.0,0.0,0.0);
- PlayerGGWeapon[killerid] = 25;
- GivePlayerWeapon(killerid,PlayerGGWeapon[killerid],9999);
- SendClientMessage(killerid,COLOR_YELLOW,"You Are Level 2, Your Gun Is Shotgun Now");
- }
- if(PlayerGGKills[killerid] == 10)
- {
- ResetPlayerWeapons(killerid);
- PlayerPlaySound(playerid,1138,0.0,0.0,0.0);
- PlayerGGWeapon[killerid] = 28;
- GivePlayerWeapon(killerid,PlayerGGWeapon[killerid],9999);
- SendClientMessage(killerid,COLOR_YELLOW,"You Are Level 3, Your Gun Is Uzi Now");
- }
- if(PlayerGGKills[killerid] == 15)
- {
- ResetPlayerWeapons(killerid);
- PlayerPlaySound(playerid,1138,0.0,0.0,0.0);
- PlayerGGWeapon[killerid] = 31;
- GivePlayerWeapon(killerid,PlayerGGWeapon[killerid],9999);
- SendClientMessage(killerid,COLOR_YELLOW,"You Are Level 4, Your Gun Is M4 Now");
- }
- if(PlayerGGKills[killerid] == 20)
- {
- ResetPlayerWeapons(killerid);
- PlayerPlaySound(playerid,1138,0.0,0.0,0.0);
- PlayerGGWeapon[killerid] = 34;
- GivePlayerWeapon(killerid,PlayerGGWeapon[killerid],9999);
- SendClientMessage(killerid,COLOR_YELLOW,"You Are Level 5, Your Gun Is Sniper Now");
- }
- if(PlayerGGKills[killerid] == 25)
- {
- ResetPlayerWeapons(killerid);
- PlayerPlaySound(playerid,1138,0.0,0.0,0.0);
- PlayerGGWeapon[killerid] = 16;
- GivePlayerWeapon(killerid,PlayerGGWeapon[killerid],9999);
- SendClientMessage(killerid,COLOR_YELLOW,"You Are Level 6, Your Gun Is Grenade Now");
- }
- if(PlayerGGKills[killerid] == 26)
- {
- ResetPlayerWeapons(killerid);
- PlayerPlaySound(playerid,1138,0.0,0.0,0.0);
- PlayerGGWeapon[killerid] = 9;
- GivePlayerWeapon(killerid,PlayerGGWeapon[killerid],9999);
- SendClientMessage(killerid,COLOR_YELLOW,"You Are Level 7, Your Gun Is ChainSaw Now");
- }
- if(PlayerGGKills[killerid] == 27)
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsInGG[i] == true)
- {
- PlayerPlaySound(i,1097,0.0,0.0,0.0);
- }
- }
- ResetPlayerWeapons(killerid);
- GGWinnerID = killerid;
- SendClientMessage(killerid,COLOR_YELLOW,"You Are Level 8, Your The Winner Of This GunGame");
- SetTimer("GunGameEnd",200,false);
- }
- if(PlayerGGKills[killerid] > GGWinnerKills)
- {
- GGWinnerKills = PlayerGGKills[killerid];
- GGWinnerID = killerid;
- format(string,sizeof(string),"The Player "COL_RED"%s(%d) "COL_WHITE"Is In Lead With "COL_RED"%d "COL_WHITE" Kills",pName,killerid,PlayerGGKills[killerid]);
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsInGG[i])
- {
- SendClientMessage(i,COLOR_WHITE,string);
- }
- }
- }
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == Dialog_GunGame)
- {
- if(response)
- {
- PlayerPlaySound(playerid,1083,0.0,0.0,0.0);
- ShowPlayerDialog(playerid,Dialog_GGBase,2,"Select Gun Game Base:","Small Base\nNormal Base\nHuge Base","Select","Quit");
- }
- }
- if(dialogid == Dialog_GGBase)
- {
- switch(listitem)
- {
- case 0:
- {
- IsGGSmall = true;
- IsGGNormal = false;
- IsGGHuge = false;
- PlayerPlaySound(playerid,1083,0.0,0.0,0.0);
- ShowPlayerDialog(playerid,Dialog_GGArmor,2,"Choose A Setting of Armor","Gun Game With Armor\nGun Game Without Armor","Select","Back");
- }
- case 1:
- {
- IsGGSmall = false;
- IsGGNormal = true;
- IsGGHuge = false;
- PlayerPlaySound(playerid,1083,0.0,0.0,0.0);
- ShowPlayerDialog(playerid,Dialog_GGArmor,2,"Choose A Setting of Armor","Gun Game With Armor\nGun Game Without Armor","Select","Back");
- }
- case 2:
- {
- IsGGSmall = false;
- IsGGNormal = false;
- IsGGHuge = true;
- PlayerPlaySound(playerid,1083,0.0,0.0,0.0);
- ShowPlayerDialog(playerid,Dialog_GGArmor,2,"Choose A Setting of Armor","Gun Game With Armor\nGun Game Without Armor","Select","Back");
- }
- }
- }
- if(dialogid == Dialog_GGArmor)
- {
- switch(listitem)
- {
- case 0:
- {
- GGArmored = true;
- PlayerPlaySound(playerid,1083,0.0,0.0,0.0);
- ShowPlayerDialog(playerid,Dialog_GGPrize,1,"Gun Game Prize","Please Enter A Amount That You Want To Set Az Prize ($1000.Min $15000.Max)::","Select","Back");
- }
- case 1:
- {
- GGArmored = false;
- PlayerPlaySound(playerid,1083,0.0,0.0,0.0);
- ShowPlayerDialog(playerid,Dialog_GGPrize,1,"Gun Game Prize","Please Enter A Amount That You Want To Set Az Prize ($1000.Min $15000.Max):","Select","Back");
- }
- }
- }
- if(dialogid == Dialog_GGPrize)
- {
- if(!strlen(inputtext)) return ShowPlayerDialog(playerid,Dialog_GGPrize,1,"Gun Game Prize","Please Enter A Amount That You Want To Set Az Prize ($1000.Min $15000.Max):","Select","Back");
- if(strval(inputtext) > 15000 || strval(inputtext) < 1000) return ShowPlayerDialog(playerid,Dialog_GGPrize,1,"Gun Game Prize","Please Enter A Amount That You Want To Set Az Prize "COL_RED"($1000.Min $15000.Max):","Select","Back");
- PlayerPlaySound(playerid,1083,0.0,0.0,0.0);
- GGWinnerPrize = strval(inputtext);
- ShowPlayerDialog(playerid,Dialog_GGPLimit,1,"Gun Game Player's:","Please Insert A Number For Player's Limit (5.Min 100.Max)::","Select","Quit");
- }
- if(dialogid == Dialog_GGPLimit)
- {
- if(!strlen(inputtext)) return ShowPlayerDialog(playerid,Dialog_GGPLimit,1,"Gun Game Player's:","Please Insert A Number For Player's Limit (5.Min 100.Max):","Select","Quit");
- if(strval(inputtext) < 5 || strval(inputtext) > 100) return ShowPlayerDialog(playerid,Dialog_GGPLimit,1,"Gun Game Player's:","Please Insert A Number For Player's Limit "COL_RED"(5.Min 100.Max):","Select","Quit");
- GGPlayerLimit = strval(inputtext);
- SendClientMessage(playerid,COLOR_WHITE,"You Have Started A GunGame Match");
- SendClientMessage(playerid,COLOR_WHITE,"You Have 5 Second's To Cancel This gungame "COL_RED"<< /cancelgungame >>");
- GGPreTimer = SetTimer("GunGamePrepare",5000,false);
- }
- return 0;
- }
- public GunGamePrepare()
- {
- new string[255],pName[MAX_PLAYER_NAME];
- GetPlayerName(GGAdminid,pName,sizeof(pName));
- GGStarted = false;
- IsAnyGG = true;
- GGWinnerID = 999;
- GGWinnerKills = 0;
- format(string,sizeof(string),"A GunGame Match Has Been Started By Admin %s(%d) With Prize of : $%d And Limit of %d player's << /joingungame >>",pName,GGAdminid,GGWinnerPrize,GGPlayerLimit);
- SendClientMessageToAll(COLOR_YELLOW,string);
- SendClientMessageToAll(COLOR_YELLOW,"You Have 1 Minute's To join This Match! Be Hurry");
- SetTimer("GunGameStart",60000,false);
- return 1;
- }
- public GunGameStart()
- {
- new RandomSkin = random(sizeof(GGSkins));
- new string[128];
- format(string,sizeof(string),"Gun Game Has Started With Prize Of "COL_YELLOW"$%d "COL_WHITE"& With "COL_YELLOW"%d/%d "COL_WHITE"Player's",GGWinnerPrize,GGPlayers,GGPlayerLimit);
- SendClientMessageToAll(COLOR_WHITE,string);
- SendClientMessageToAll(COLOR_YELLOW,"Now, You Can Watch this Match With /specgungame");
- GGStarted = true;
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsInGG[i] == true)
- {
- if(IsGGSmall == true)
- {
- new RandomSpawn = random(sizeof(GGSmallSp));
- if(GGArmored == true)
- {
- TogglePlayerControllable(i,1);
- SetPlayerInterior(i,1);
- SetPlayerSkin(i,GGSkins[RandomSkin]);
- SetPlayerPos(i,GGSmallSp[RandomSpawn][0],GGSmallSp[RandomSpawn][1],GGSmallSp[RandomSpawn][2]);
- SetPlayerFacingAngle(i,GGSmallSp[RandomSpawn][3]);
- SetPlayerHealth(i,100.0);
- SetPlayerArmour(i,50.0);
- SendClientMessage(i,COLOR_RED,"Gun Game Started ! Kill To Level Up And Get Better Gun's");
- PlayerPlaySound(i,1069,0.0,0.0,0.0);
- }
- else
- {
- TogglePlayerControllable(i,1);
- SetPlayerInterior(i,1);
- SetPlayerSkin(i,GGSkins[RandomSkin]);
- SetPlayerPos(i,GGSmallSp[RandomSpawn][0],GGSmallSp[RandomSpawn][1],GGSmallSp[RandomSpawn][2]);
- SetPlayerFacingAngle(i,GGSmallSp[RandomSpawn][3]);
- SetPlayerHealth(i,100.0);
- SendClientMessage(i,COLOR_RED,"Gun Game Started ! Kill To Level Up And Get Better Gun's");
- PlayerPlaySound(i,1069,0.0,0.0,0.0);
- }
- }
- if(IsGGNormal == true)
- {
- new RandomSpawn = random(sizeof(GGNormalSp));
- if(GGArmored == true)
- {
- TogglePlayerControllable(i,1);
- SetPlayerInterior(i,14);
- SetPlayerSkin(i,GGSkins[RandomSkin]);
- SetPlayerPos(i,GGNormalSp[RandomSpawn][0],GGNormalSp[RandomSpawn][1],GGNormalSp[RandomSpawn][2]);
- SetPlayerFacingAngle(i,GGNormalSp[RandomSpawn][3]);
- SetPlayerHealth(i,100.0);
- SetPlayerArmour(i,50.0);
- SendClientMessage(i,COLOR_RED,"Gun Game Started ! Kill To Level Up And Get Better Gun's");
- PlayerPlaySound(i,1069,0.0,0.0,0.0);
- }
- else
- {
- TogglePlayerControllable(i,1);
- SetPlayerInterior(i,14);
- SetPlayerSkin(i,GGSkins[RandomSkin]);
- SetPlayerPos(i,GGNormalSp[RandomSpawn][0],GGNormalSp[RandomSpawn][1],GGNormalSp[RandomSpawn][2]);
- SetPlayerFacingAngle(i,GGNormalSp[RandomSpawn][3]);
- SetPlayerHealth(i,100.0);
- SendClientMessage(i,COLOR_RED,"Gun Game Started ! Kill To Level Up And Get Better Gun's");
- PlayerPlaySound(i,1069,0.0,0.0,0.0);
- }
- }
- if(IsGGHuge == true)
- {
- new RandomSpawn = random(sizeof(GGHugeSp));
- if(GGArmored == true)
- {
- TogglePlayerControllable(i,1);
- SetPlayerInterior(i,15);
- SetPlayerSkin(i,GGSkins[RandomSkin]);
- SetPlayerPos(i,GGHugeSp[RandomSpawn][0],GGHugeSp[RandomSpawn][1],GGHugeSp[RandomSpawn][2]);
- SetPlayerFacingAngle(i,GGHugeSp[RandomSpawn][3]);
- SetPlayerHealth(i,100.0);
- SetPlayerArmour(i,50.0);
- SendClientMessage(i,COLOR_RED,"Gun Game Started ! Kill To Level Up And Get Better Gun's");
- PlayerPlaySound(i,1069,0.0,0.0,0.0);
- }
- else
- {
- TogglePlayerControllable(i,1);
- SetPlayerInterior(i,15);
- SetPlayerSkin(i,GGSkins[RandomSkin]);
- SetPlayerPos(i,GGHugeSp[RandomSpawn][0],GGHugeSp[RandomSpawn][1],GGHugeSp[RandomSpawn][2]);
- SetPlayerFacingAngle(i,GGHugeSp[RandomSpawn][3]);
- SetPlayerHealth(i,100.0);
- SendClientMessage(i,COLOR_RED,"Gun Game Started ! Kill To Level Up And Get Better Gun's");
- PlayerPlaySound(i,1069,0.0,0.0,0.0);
- }
- }
- }
- }
- return 1;
- }
- public GunGameEnd()
- {
- GGStarted = false;
- IsAnyGG = false;
- GGArmored = false;
- IsGGHuge = false;
- IsGGSmall = false;
- IsGGNormal = false;
- GGAdminid = 999;
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsInGG[i] == true)
- {
- PlayerPlaySound(i,1098,0.0,0.0,0.0);
- new pName[MAX_PLAYER_NAME],string[128];
- GetPlayerName(GGWinnerID,pName,sizeof(pName));
- format(string,sizeof(string),"The Player "COL_RED"%s(%d) Won "COL_WHITE"The GunGame With Prize of : %d",pName,GGWinnerID,GGWinnerPrize);
- SetPlayerInterior(i,0);
- IsInGG[i] = false;
- PlayerGGWeapon[i] = 0;
- GivePlayerMoney(GGWinnerID,GGWinnerPrize);
- SendClientMessageToAll(COLOR_WHITE,string);
- GGPlayers = 0;
- PlayerGGKills[i] = 0;
- ResetPlayerWeapons(i);
- SpawnPlayer(i);
- SetPlayerPos(i,GetPVarFloat(i,"OldPosX"),GetPVarFloat(i,"OldPosY"),GetPVarFloat(i,"OldPosZ"));
- DeletePVar(i,"OldPosX");
- DeletePVar(i,"OldPosY");
- DeletePVar(i,"OldPosZ");
- }
- if(IsSpecingGG[i] == true)
- {
- SetPlayerInterior(i,0);
- SendClientMessage(i,COLOR_YELLOW,"GunGame Has Finished");
- SpawnPlayer(i);
- SetCameraBehindPlayer(i);
- SetPlayerPos(i,GetPVarFloat(i,"oldPosX"),GetPVarFloat(i,"oldPosY"),GetPVarFloat(i,"oldPosZ"));
- DeletePVar(i,"oldPosX");
- DeletePVar(i,"oldPosY");
- DeletePVar(i,"oldPosZ");
- IsSpecingGG[i] = false;
- }
- }
- return 1;
- }
- CMD:gungame(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You Are Not An Admin !");
- if(GGStarted == true) return SendClientMessage(playerid,COLOR_LIGHTRED,"There Is A GunGame Started");
- GGAdminid = playerid;
- ShowPlayerDialog(playerid,Dialog_GunGame,0,""COL_WHITE"Gun Game Setting's",""COL_WHITE"This Is Perfect System To Make Gungame\nAre Your Sure You Want Make A Gun Game ?","Yes","No");
- return 1;
- }
- CMD:joingungame(playerid, params[])
- {
- if(GGStarted == true) return SendClientMessage(playerid,COLOR_YELLOW,"GunGame Has Been Started You Can Not Join !");
- if(IsInGG[playerid] == true) return SendClientMessage(playerid,COLOR_YELLOW,"You Already Joined This Match");
- if(IsAnyGG == false) return SendClientMessage(playerid,COLOR_YELLOW,"There Is No GunGame Started");
- if(GGPlayers == GGPlayerLimit) return SendClientMessage(playerid,COLOR_YELLOW,"There is No Empty Room In GunGame");
- new Float:OldX,Float:OldY,Float:OldZ;
- GetPlayerPos(playerid,OldX,OldY,OldZ);
- SetPVarFloat(playerid,"OldPosX",OldX);
- SetPVarFloat(playerid,"OldPosY",OldY);
- SetPVarFloat(playerid,"OldPosZ",OldZ);
- SendClientMessage(playerid,COLOR_LIGHTBLUE,"You Have Joined This Gungame Match!!!");
- SendClientMessage(playerid,COLOR_LIGHTBLUE,"Wait For 50 Second's To Let Other Player's Join");
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid,24,9999);
- TogglePlayerControllable(playerid,0);
- GGPlayers++;
- IsInGG[playerid] = true;
- PlayerGGWeapon[playerid] = 24;
- PlayerGGKills[playerid] = 0;
- PlayerPlaySound(playerid,1068,0.0,0.0,0.0);
- return 1;
- }
- CMD:specgungame(playerid,params[])
- {
- if(IsAnyGG == false) return SendClientMessage(playerid,COLOR_RED,"There Is No Gun Game");
- if(GGStarted == false) return SendClientMessage(playerid,COLOR_RED,"Gun Game Not Started Yet");
- if(IsInGG[playerid] == true) return SendClientMessage(playerid,COLOR_RED,"You Can Not Spec While you Are In GunGame");
- if(IsSpecingGG[playerid] == false)
- {
- new pName[MAX_PLAYER_NAME],string[128],Float:oldX,Float:oldY,Float:oldZ;
- if(IsGGSmall == true)
- {
- SetPlayerInterior(playerid,1);
- GetPlayerName(playerid,pName,sizeof(pName));
- GetPlayerPos(playerid,oldX,oldY,oldZ);
- SetPVarFloat(playerid,"oldPosX",oldX);
- SetPVarFloat(playerid,"oldPosY",oldY);
- SetPVarFloat(playerid,"oldPosZ",oldZ);
- SetPlayerCameraPos(playerid,-1401.5728,107.2614,1090.8381);
- SetPlayerCameraLookAt(playerid,-1401.6565,107.2420,1032.2734,CAMERA_CUT);
- IsSpecingGG[playerid] = true;
- SendClientMessage(playerid,COLOR_YELLOW,"You Are Now Watching GunGame use /specgungame Again To Stop Watching");
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsInGG[i] == true)
- {
- format(string,sizeof(string),"Player "COL_RED"%s(%d) "COL_WHITE"Is Watching GunGame",pName,playerid);
- SendClientMessage(i,COLOR_WHITE,string);
- }
- }
- }
- if(IsGGNormal == true)
- {
- SetPlayerInterior(playerid,14);
- GetPlayerName(playerid,pName,sizeof(pName));
- GetPlayerPos(playerid,oldX,oldY,oldZ);
- SetPVarFloat(playerid,"oldPosX",oldX);
- SetPVarFloat(playerid,"oldPosY",oldY);
- SetPVarFloat(playerid,"oldPosZ",oldZ);
- SetPlayerCameraPos(playerid,-1349.1023,1555.9911,1082.7157);
- SetPlayerCameraLookAt(playerid,-1446.3850,1620.6434,1054.4141,CAMERA_CUT);
- IsSpecingGG[playerid] = true;
- SendClientMessage(playerid,COLOR_YELLOW,"You Are Now Watching GunGame use /specgungame Again To Stop Watching");
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsInGG[i] == true)
- {
- format(string,sizeof(string),"Player "COL_RED"%s(%d) "COL_WHITE"Is Watching GunGame",pName,playerid);
- SendClientMessage(i,COLOR_WHITE,string);
- }
- }
- }
- if(IsGGHuge == true)
- {
- SetPlayerInterior(playerid,15);
- GetPlayerName(playerid,pName,sizeof(pName));
- GetPlayerPos(playerid,oldX,oldY,oldZ);
- SetPVarFloat(playerid,"oldPosX",oldX);
- SetPVarFloat(playerid,"oldPosY",oldY);
- SetPVarFloat(playerid,"oldPosZ",oldZ);
- SetPlayerCameraPos(playerid,-1345.1965,927.7277,1059.6145);
- SetPlayerCameraLookAt(playerid,-1387.4464,994.6185,1024.0735,CAMERA_CUT);
- IsSpecingGG[playerid] = true;
- SendClientMessage(playerid,COLOR_YELLOW,"You Are Now Watching GunGame use /specgungame Again To Stop Watching");
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsInGG[i] == true)
- {
- format(string,sizeof(string),"Player "COL_RED"%s(%d) "COL_WHITE"Is Watching GunGame",pName,playerid);
- SendClientMessage(i,COLOR_WHITE,string);
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid,COLOR_YELLOW,"You Have Stopped Specing GunGame");
- SetPlayerInterior(playerid,0);
- SpawnPlayer(playerid);
- SetCameraBehindPlayer(playerid);
- SetPlayerPos(playerid,GetPVarFloat(playerid,"oldPosX"),GetPVarFloat(playerid,"oldPosY"),GetPVarFloat(playerid,"oldPosZ"));
- DeletePVar(playerid,"oldPosX");
- DeletePVar(playerid,"oldPosY");
- DeletePVar(playerid,"oldPosZ");
- IsSpecingGG[playerid] = false;
- }
- return 1;
- }
- CMD:stopgungame(playerid,params[])
- {
- if(IsAnyGG == false) return SendClientMessage(playerid,COLOR_RED,"There Is No Gun Game");
- if(GGStarted == false) return SendClientMessage(playerid,COLOR_RED,"GunGame Is Not Started Yet");
- if(GGAdminid != playerid) return SendClientMessage(playerid,COLOR_RED,"You Are Not Admin of This Gungame !");
- SendClientMessageToAll(COLOR_YELLOW,"Gun Game Has Been Stopped By An Admin!");
- SetTimer("GunGameEnd",900,false);
- return 1;
- }
- CMD:cancelgungame(playerid,params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You Are Not Admin");
- if(GGStarted == true) return SendClientMessage(playerid,COLOR_RED,"This Gun Game Has Been Started");
- if(GGAdminid != playerid) return SendClientMessage(playerid,COLOR_RED,"You Are Not Admin Of This GunGame");
- SendClientMessage(playerid,COLOR_YELLOW,"You Have Canceled GunGame");
- KillTimer(GGPreTimer);
- return 1;
- }
- CMD:gungamers(playerid,params[])
- {
- new pName[MAX_PLAYER_NAME],string[128];
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsInGG[i] == true)
- {
- GetPlayerName(i,pName,sizeof(pName));
- format(string,sizeof(string),""COL_YELLOW"- "COL_WHITE"%s(%d) With %d Kill's",pName,i,PlayerGGKills[i]);
- SendClientMessage(playerid,COLOR_WHITE,string);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement