Tazer help
#7

Код:
CMD:tazer(playerid, params[])
{
    if(PlayerInfo[playerid][pLevel] == 0)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid, COLOR_GREY, "You can't do this while you're in a vehicle.");
            return 1;
        }

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

        if(PlayerInfo[playerid][pJailed] > 0)
        {
            SendClientMessage(playerid, COLOR_WHITE, "You cannot use this in jail/prison.");
            return 1;
        }
        if(PlayerCuffed[playerid] >= 1) {
            SendClientMessage(playerid, COLOR_WHITE, "You cannot use this while tazed/cuffed.");
            return 1;
        }

        if(PlayerInfo[playerid][pTazer] == 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(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            GivePlayerValidWeapon(playerid, 23, 60000);
            PlayerInfo[playerid][pTazer] = 1;
        }
        else
        {
            RemovePlayerWeapon(playerid, 23);
            GivePlayerValidWeapon(playerid, pTazerReplace[playerid], 60000);
            format(string, sizeof(string), "* %s holsters their tazer.", GetPlayerNameEx(playerid));
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            PlayerInfo[playerid][pTazer] = 0;
        }
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GREY, "   You are not a Cop!");
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
Tazer help - by RenSoprano - 18.03.2012, 19:18
Re: Tazer help - by RenSoprano - 18.03.2012, 19:20
Re: Tazer help - by WoodPecker - 18.03.2012, 19:24
Re: Tazer help - by Roel - 18.03.2012, 19:25
Re: Tazer help - by Georgi166 - 18.03.2012, 19:25
Re: Tazer help - by RenSoprano - 18.03.2012, 19:27
Re: Tazer help - by WoodPecker - 18.03.2012, 19:36
Re: Tazer help - by RenSoprano - 18.03.2012, 19:41
Re: Tazer help - by WoodPecker - 18.03.2012, 19:42

Forum Jump:


Users browsing this thread: 4 Guest(s)