Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //////////NEWS////////////////
- new ScopeEnabled = 1;
- /////////enum pInfo//////////
- pScope,
- //////////////////////////////////HH checkfloats//////////////////////////////////////////////
- PlayerInfo[playerid][pScope] = 0;
- ///////////////////////////////newskey/Keyboard buttons////////////////////////////////////////
- if(newkeys & KEY_FIRE && newkeys & KEY_HANDBRAKE)
- {
- if(GetPlayerWeapon(playerid) == 34 && PlayerInfo[playerid][pScope] == 1 && PlayerInfo[playerid][pMember] == 8 && ScopeEnabled == 1)
- {
- new Float:blahx, Float:blahy, Float:blahz;
- HeadshotCheck(playerid, blahx, blahy, blahz);
- }
- }
- }
- /////////////////////////////////format///////////////////////////////////////////////////////
- format(var, 32, "Scope=%d\n",PlayerInfo[playerid][pScope]);fwrite(hFile, var);
- format(var, 32, "Scope=%d\n",PlayerInfo[playerid][pScope]);fwrite(hFile, var);
- ///////////////////////////////strcmp, key///////////////////////////////////////////////////
- if( strcmp( key , "Scope" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pScope] = strval( val ); }
- ///////////////////////////////command///////////////////////////////////////////////////////
- CMD:order(playerid, params[])
- {
- if (IsAHitman(playerid))
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
- if(IsPlayerInRangeOfPoint(playerid, 4.0, -71.419654846191,1360.4097900391,1080.2185058594) || IsPlayerInRangeOfPoint(playerid, 6.0, 1415.727905, -1299.371093, 15.054657))
- {
- if(PlayerInfo[playerid][pConnectHours] < 2 || PlayerInfo[playerid][pWRestricted] > 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "You cannot use this as you are currently restricted from possessing weapons!");
- new Hitman[32], skin = -1;
- if(sscanf(params, "s[32]D", Hitman, skin))
- {
- SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /order [name]");
- SendClientMessageEx(playerid, COLOR_GRAD2, " Rank 1: Knife ($800), SDPistol ($1000), Shotgun ($1500), Skin ($2500), Desert Eagle ($5000), MP5 ($2500), Kevlar Vest ($6000), firstaid ($500)");
- SendClientMessageEx(playerid, COLOR_GRAD2, " Rank 2: Rifle ($3000), AK47 ($10,000), M4 ($12,000)");
- SendClientMessageEx(playerid, COLOR_GRAD2, " Rank 3: SPAS-12 ($35,000), Sniper ($35,000)");
- SendClientMessageEx(playerid, COLOR_GRAD2, " Rank 4: C4 ($50,000), Scope ($100,000)");
- return 1;
- }
- else if(strcmp(Hitman,"skin",true) == 0)
- {
- if(PlayerInfo[playerid][pRank] < 1) {
- SendClientMessageEx(playerid, COLOR_GREY, "You are not the required rank for that!");
- }
- else if(IsInvalidSkin(skin)) {
- SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /order skin [skin ID]");
- }
- else if(GetPlayerCash(playerid) >= 2500) {
- SetPlayerSkin(playerid, skin);
- PlayerInfo[playerid][pModel] = skin;
- GivePlayerCash(playerid, -2500);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"You have purchased a skin!");
- }
- else SendClientMessageEx(playerid, COLOR_GREY," You can't afford that!");
- }
- else if(strcmp(Hitman,"Scope",true) == 0)
- {
- if(PlayerInfo[playerid][pRank] < 4)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You are not the required rank for that weapon!");
- return 1;
- }
- if(GetPlayerCash(playerid) >= 100000)
- {
- PlayerInfo[playerid][pScope] = 1;
- GivePlayerCash(playerid, -100000);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased a scope!");
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY," You can't afford that package!");
- return 1;
- }
- }
- else if(strcmp(Hitman,"Knife",true) == 0)
- {
- if(PlayerInfo[playerid][pRank] < 1)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You are not the required rank for that weapon!");
- return 1;
- }
- if(GetPlayerCash(playerid) >= 800)
- {
- GivePlayerValidWeapon(playerid, 4, 3);
- GivePlayerCash(playerid, -800);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased a knife!");
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY," You can't afford that package!");
- return 1;
- }
- }
- else if(strcmp(Hitman,"firstaid",true) == 0)
- {
- if(PlayerInfo[playerid][pRank] < 1)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You are not the required rank for that!");
- return 1;
- }
- if(GetPlayerCash(playerid) >= 500)
- {
- SetPlayerHealth(playerid, 100);
- GivePlayerCash(playerid, -500);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased a firstaid!");
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY," You can't afford that package!");
- return 1;
- }
- }
- else if(strcmp(Hitman,"SDPistol",true) == 0)
- {
- if(PlayerInfo[playerid][pRank] < 1)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You are not the required rank for that weapon!");
- return 1;
- }
- if(GetPlayerCash(playerid) >= 1000)
- {
- GivePlayerValidWeapon(playerid, 23, 99999);
- GivePlayerCash(playerid, -1000);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased a silenced pistol!");
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY," You can't afford that package!");
- return 1;
- }
- }
- else if(strcmp(Hitman,"Shotgun",true) == 0)
- {
- if(PlayerInfo[playerid][pRank] < 1)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You are not the required rank for that weapon!");
- return 1;
- }
- if(GetPlayerCash(playerid) >= 1500)
- {
- GivePlayerValidWeapon(playerid, 25, 99999);
- GivePlayerCash(playerid, -1500);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased a shotgun!");
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY," You can't afford that package!");
- return 1;
- }
- }
- else if(strcmp(Hitman,"Deagle",true) == 0)
- {
- if(PlayerInfo[playerid][pRank] < 1)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You are not the required rank for that weapon!");
- return 1;
- }
- if(GetPlayerCash(playerid) > 5000)
- {
- GivePlayerValidWeapon(playerid, 24, 99999);
- GivePlayerCash(playerid, -5000);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased a Desert Eagle!");
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY," You can't afford that package!");
- return 1;
- }
- }
- else if(strcmp(Hitman,"MP5",true) == 0)
- {
- if(PlayerInfo[playerid][pRank] < 1)
- {
- SendClientMessageEx(playerid, COLOR_GREY, " You are not the required rank for that weapon!");
- return 1;
- }
- if(GetPlayerCash(playerid) >= 2500)
- {
- GivePlayerValidWeapon(playerid, 29, 99999);
- GivePlayerCash(playerid, -2500);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased an MP5!");
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY," You can't afford that package!");
- return 1;
- }
- }
- else if(strcmp(Hitman,"Rifle",true) == 0)
- {
- if(PlayerInfo[playerid][pRank] < 2)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You are not the required rank for that weapon!");
- return 1;
- }
- if(GetPlayerCash(playerid) >= 3000)
- {
- GivePlayerValidWeapon(playerid, 33, 99999);
- GivePlayerCash(playerid, -3000);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased a rifle!");
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY," You can't afford that package!");
- return 1;
- }
- }
- else if(strcmp(Hitman,"AK47",true) == 0)
- {
- if(PlayerInfo[playerid][pRank] < 2)
- {
- SendClientMessageEx(playerid, COLOR_GREY, " you are not the required rank for that weapon!");
- return 1;
- }
- if(GetPlayerCash(playerid) >= 10000)
- {
- GivePlayerValidWeapon(playerid, 30, 99999);
- GivePlayerCash(playerid, -10000);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased an AK-47!");
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY," You can't afford that package!");
- return 1;
- }
- }
- else if(strcmp(Hitman,"M4",true) == 0)
- {
- if(PlayerInfo[playerid][pRank] < 2)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You are not the required rank for that weapon!");
- return 1;
- }
- if(GetPlayerCash(playerid) >= 12000)
- {
- GivePlayerValidWeapon(playerid, 31, 99999);
- GivePlayerCash(playerid, -12000);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased an M4!");
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY," You can't afford that package!");
- return 1;
- }
- }
- else if(strcmp(Hitman,"Vest",true) == 0)
- {
- if(PlayerInfo[playerid][pRank] < 1)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You are not the required rank for that weapon!");
- return 1;
- }
- if(GetPlayerCash(playerid) >= 6000)
- {
- SetPlayerArmor(playerid, 99);
- GivePlayerCash(playerid, -6000);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased a kevlar vest!");
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY," You can't afford that package!");
- return 1;
- }
- }
- else if(strcmp(Hitman,"Spas12",true) == 0)
- {
- if(PlayerInfo[playerid][pRank] < 3)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You are not the required rank for that weapon!");
- return 1;
- }
- if(GetPlayerCash(playerid) >= 35000)
- {
- GivePlayerValidWeapon(playerid, 27, 99999);
- GivePlayerCash(playerid, -35000);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased a SPAS-12!");
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY," You can't afford that package!");
- return 1;
- }
- }
- else if(strcmp(Hitman,"Sniper",true) == 0)
- {
- if(PlayerInfo[playerid][pRank] < 3)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You are not the required rank for that weapon!");
- return 1;
- }
- if(GetPlayerCash(playerid) >= 35000)
- {
- GivePlayerValidWeapon(playerid, 34, 99999);
- GivePlayerCash(playerid, -35000);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased a sniper rifle!");
- return 1;
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY," You can't afford that package!");
- return 1;
- }
- }
- else if(strcmp(Hitman,"C4",true) == 0)
- {
- if(PlayerInfo[playerid][pRank] < 4)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Yyou are not the required rank for that weapon!");
- return 1;
- }
- if(GetPlayerCash(playerid) >= 50000)
- {
- PlayerInfo[playerid][pC4Get] = 1;
- PlayerInfo[playerid][pBombs]++;
- GivePlayerCash(playerid, -50000);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased one block of C4!");
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY," You can't afford that package!");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, " You are not at the gun shack!");
- return 1;
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "You are not a member of the hitman agency!");
- return 1;
- }
- return 1;
- }
- ///////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement