tazer help
#7

this cmd work 100%100

Код:
CMD:tazer(playerid, params[])
{
	if(HungerPlayerInfo[playerid][hgInEvent] != 0) return SendClientMessageEx(playerid, COLOR_GREY, "   You cannot do this while being in the Hunger Games Event!");
    #if defined zombiemode
	if(zombieevent == 1 && GetPVarType(playerid, "pIsZombie")) return SendClientMessageEx(playerid, COLOR_GREY, "Zombies can't use this.");
	#endif
	if(IsACop(playerid))
	{
		new string[128];
		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!");

		if(IsPlayerInAnyVehicle(playerid))
		{
			SendClientMessageEx(playerid, COLOR_GREY, "You can't do this while you're in a vehicle.");
			return 1;
		}

		if(GetPVarInt(playerid, "IsInArena") >= 0)
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this right now, you are in a arena!");
			return 1;
		}
		if(GetPVarInt( playerid, "EventToken") != 0)
		{
			SendClientMessageEx(playerid, COLOR_GREY, "You can't use the tazer while you're in an event.");
			return 1;
		}
		if(PlayerCuffedTime[playerid] > 0)
		{
			SendClientMessageEx(playerid, COLOR_GREY, "You can't do this right now.");
			return 1;
		}
		if(GetPVarInt(playerid, "Injured") == 1)
		{
			SendClientMessageEx(playerid, COLOR_GREY, "You can't do this right now.");
			return 1;
		}

		if(PlayerInfo[playerid][pJailTime] > 0)
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "You cannot use this in jail/prison.");
			return 1;
		}
		if(PlayerCuffed[playerid] >= 1) {
			SendClientMessageEx(playerid, COLOR_WHITE, "You cannot use this while tazed/cuffed.");
			return 1;
		}
		if(PlayerInfo[playerid][pHasTazer] < 1)
		{
		    SendClientMessage(playerid, COLOR_WHITE, "You do not have a tazer!");
		    return 1;
		}

		if(pTazer{playerid} == 0)
		{
			pTazerReplace{playerid} = PlayerInfo[playerid][pGuns][2];
			if(PlayerInfo[playerid][pGuns][2] != 0) RemovePlayerWeapon(playerid, PlayerInfo[playerid][pGuns][2]);
			format(string, sizeof(string), "* %s unholsters their tazer.", GetPlayerNameEx(playerid));
			ProxDetector(4.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			GivePlayerValidWeapon(playerid, 23, 60000);
			pTazer{playerid} = 1;
		}
		else
		{
			RemovePlayerWeapon(playerid, 23);
			GivePlayerValidWeapon(playerid, pTazerReplace{playerid}, 60000);
			format(string, sizeof(string), "* %s holsters their tazer.", GetPlayerNameEx(playerid));
			ProxDetector(4.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			pTazer{playerid} = 0;
		}
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GRAD2, "   You are not a law enforcement officer!");
		return 1;
	}
	return 1;
}
Reply


Messages In This Thread
tazer help - by b00m112 - 19.01.2015, 17:48
Re: tazer help - by ChromeAmazing - 19.01.2015, 17:50
Re: tazer help - by zT KiNgKoNg - 19.01.2015, 17:55
Re: tazer help - by b00m112 - 19.01.2015, 18:13
Re: tazer help - by b00m112 - 19.01.2015, 19:55
Re: tazer help - by b00m112 - 20.01.2015, 19:29
Re: tazer help - by Trevor Gin - 20.01.2015, 20:45
Re: tazer help - by b00m112 - 21.01.2015, 12:04
Re: tazer help - by b00m112 - 21.01.2015, 14:17

Forum Jump:


Users browsing this thread: 1 Guest(s)