Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////// Them vao cuoi gamemodes
- /////////////////////////////////////////////// VUT SUNG //////////////////////////////////////////////////////
- CMD:vutsung(playerid, params[])
- {
- if(isnull(params))
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Su dung: /vutsung [weapon name]");
- SendClientMessageEx(playerid, COLOR_GRAD2, "Ten Co San: sdpistol, shotgun, 9mm, mp5, uzi, tec9, rifle, deagle, ak47, m4, spas12, camera");
- SendClientMessageEx(playerid, COLOR_GRAD2, "Ten Co San: flowers, knuckles, baseballbat, cane, shovel, poolcue, golfclub, katana, dildo, parachute");
- if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "Ten Co San: knife");
- }
- if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pDivision] == 2 || (PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pRank] >= 5) || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pMember] == 11)
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "Ten Co San: nitestick, mace, smoke, chainsaw, fire");
- }
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessageEx (playerid, COLOR_GRAD2, "Ban khong the vut sung trong xe!");
- return 1;
- }
- if(GetPVarInt(playerid, "IsInArena") >= 0)
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "Ban khong the lam viec do bay gio, ban dang trong Dau Truong!");
- return 1;
- }
- if(GetPVarInt( playerid, "EventToken") != 0)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong the lam dieu nay khi dang trong event.");
- return 1;
- }
- new string[128];
- if(strcmp(params, "sdpistol", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 2 ] == 23)
- {
- if(pTazer{playerid} == 1) return SendClientMessageEx(playerid, COLOR_RED, "Ban khong the vut bo sung dien.");
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo silenced pistol.");
- format(string, sizeof(string), "* %s da vut bo silenced pistol.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 23);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 23;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "camera", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 9 ] == 43)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo camera.");
- format(string, sizeof(string), "* %s da vut bo camera.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 43);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 43;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "nitestick", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][1] == 3)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo nitestick.");
- format(string, sizeof(string), "* %s da vut bo nitestick.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 3);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 3;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "mace", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][9] == 41)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo mace.");
- format(string, sizeof(string), "* %s da vut bo mace.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 41);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 41;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "knife", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 1 ] == 4)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo dao.");
- format(string, sizeof(string), "* %s da vut bo dao.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 4);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 4;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "9mm", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 2 ] == 22)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo 9mm pistol.");
- format(string, sizeof(string), "* %s da vut bo 9mm pistol.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 22);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 22;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "shotgun", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 3 ] == 25)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo shotgun.");
- format(string, sizeof(string), "* %s da vut bo shotgun.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 25);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 25;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "mp5", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 4 ] == 29)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo MP5.");
- format(string, sizeof(string), "* %s da vut bo MP5.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 29);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 29;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "uzi", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 4 ] == 28)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo Micro SMG.");
- format(string, sizeof(string), "* %s da vut bo Micro SMG.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 28);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 28;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "uzi", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 4 ] == 32)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo Tec-9.");
- format(string, sizeof(string), "* %s da vut bo Tec-9.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 32);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 32;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "deagle", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 2 ] == 24)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo Desert Eagle.");
- format(string, sizeof(string), "* %s da vut bo Desert Eagle.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 24);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 24;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "rifle", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 6 ] == 33)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo rifle.");
- format(string, sizeof(string), "* %s da vut bo rifle.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 33);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 33;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "ak47", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 5 ] == 30)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo AK-47.");
- format(string, sizeof(string), "* %s da vut bo AK-47.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 30);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 30;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "m4", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 5 ] == 31)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo M4.");
- format(string, sizeof(string), "* %s da vut bo M4.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 31);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 31;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "spas12", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 3 ] == 27)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo SPAS-12.");
- format(string, sizeof(string), "* %s da vut bo SPAS-12.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 27);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 27;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "flowers", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 10 ] == 14)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo flowers.");
- format(string, sizeof(string), "* %s da vut bo flowers.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 14);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 14;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "knuckles", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 0 ] == 1)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo brass knuckles.");
- format(string, sizeof(string), "* %s da vut bo brass knuckles.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 1);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 1;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "baseballbat", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 1 ] == 5)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo baseball bat.");
- format(string, sizeof(string), "* %s da vut bo baseball bat.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 5);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 5;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "cane", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 10 ] == 15)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo cane.");
- format(string, sizeof(string), "* %s da vut bo cane.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- PlayerInfo[playerid][pGuns][ 10 ] = 0;
- RemovePlayerWeapon(playerid, 15);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 15;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "shovel", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 1 ] == 6)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo shovel.");
- format(string, sizeof(string), "* %s da vut bo shovel.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 6);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 6;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "golfclub", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 1 ] == 2)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo golf club.");
- format(string, sizeof(string), "* %s da vut bo golf club.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 2);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 2;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "katana") == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 1 ] == 8)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo katana.");
- format(string, sizeof(string), "* %s da vut bo katana.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 8);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 8;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "dildo", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 10 ] == 10)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo dildo.");
- format(string, sizeof(string), "* %s da vut bo dildo.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 10);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 10;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "parachute", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 11 ] == 46)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo parachute.");
- format(string, sizeof(string), "* %s da vut bo parachute.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 46);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 46;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "smoke", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 8 ] == 17)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo smoke grenade.");
- format(string, sizeof(string), "* %s da vut bo smoke grenade.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 17);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 17;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "chainsaw", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 1 ] == 9)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo chainsaw.");
- format(string, sizeof(string), "* %s da vut bo chainsaw.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 9);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 9;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "fire", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 9 ] == 42)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo fire extinguisher.");
- format(string, sizeof(string), "* %s da vut bo fire extinguisher.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 42);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 42;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "minigun", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 7 ] == 38)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo minigun.");
- format(string, sizeof(string), "* %s da vut bo minigun.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 38);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 38;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else if(strcmp(params, "poolcue", true) == 0)
- {
- if(PlayerInfo[playerid][pGuns][ 1 ] == 7)
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo pool cue.");
- format(string, sizeof(string), "* %s da vut bo pool cue.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RemovePlayerWeapon(playerid, 7);
- if(IsACop(playerid)) return 1;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- new GunID = 7;
- DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "Ten vu khi khong hop le.");
- }
- return 1;
- }
- ///////////////////////////////////////// Nhat Sung /////////////////////////////////////////////////
- CMD:nhatsung(playerid, params[])
- {
- if(GetPVarInt(playerid, "IsInArena") >= 0)
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "Ban khong the lam viec do bay gio, ban dang trong arena!");
- return 1;
- }
- if(GetPVarInt( playerid, "EventToken") != 0)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban khong the lam dieu nay khi dang trong event.");
- return 1;
- }
- new Float:health;
- GetPlayerHealth(playerid, health);
- if (health < 20)
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "Ban khong the nhat sung khi mau nho hon 20!");
- return 1;
- }
- if(GetPVarInt(playerid, "Injured") != 0||PlayerCuffed[playerid]!=0||PlayerInfo[playerid][pHospital]!=0||GetPlayerState(playerid) == 7)
- {
- SendClientMessageEx (playerid, COLOR_GRAD2, "Ban khong the lam dieu do bay gio.");
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessageEx (playerid, COLOR_GRAD2, "Ban khong the dua sung trong xe!");
- return 1;
- }
- if(PlayerInfo[playerid][pLawyerFreeTime] > 1)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "Ban can phai doi 10s tu lan chuyen doi vu khi de co the tiep tuc nhat sung sung!");
- return 1;
- }
- if (GetPVarInt(playerid, "GiveWeaponTimer") > 0)
- {
- new string[58];
- format(string, sizeof(string), "Ban phai cho %d giay truoc khi tiep tuc nhat sung.", GetPVarInt(playerid, "GiveWeaponTimer"));
- SendClientMessageEx(playerid,COLOR_GREY,string);
- return 1;
- }
- for(new i = 0; i < sizeof(DropInfo); i++)
- {
- if (IsPlayerInRangeOfPoint(playerid, 2.0,DropInfo[i][DropGunPosX],DropInfo[i][DropGunPosY],DropInfo[i][DropGunPosZ]))
- {
- if(GetPlayerVirtualWorld(playerid) == DropInfo[i][DropGunVWorld] && GetPlayerInterior(playerid) == DropInfo[i][DropGunVWorld])
- {
- DestroyDynamicObject(DropObject[i]);
- DropInfo[i][DropGunPosX] = 0.0;
- DropInfo[i][DropGunPosY] = 0.0;
- DropInfo[i][DropGunPosZ] = 0.0;
- GivePlayerValidWeapon(playerid, DropInfo[i][DropGunModel], 60000);
- new string3[128];
- format(string3, sizeof(string3), "* %s da nhat sung tu duoi dat len.", GetPlayerNameEx(playerid));
- ProxDetector(15.0, playerid, string3, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- return 1;
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement