[Ajuda] Comando /Pregos
#1

Oi a todos, gostava de saber porque que neste comando os Pregos nгo furam peneus dos carros:

pawn Код:
CMD:createspike(playerid, params[])
{
    new string[128], Float:Pos[4];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(!IsACop(playerid) && !IsFBI(playerid) && !IsARES(playerid) && !IsAGov(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not a LEO.");
    if(!PlayerInfo[playerid][pFacDuty]) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
    if(PlayerInfo[playerid][pFacRank] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command. (Rank 4+)");
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    GetPlayerFacingAngle(playerid,Pos[3]);
    CreateStrip(x, y, z, angle);
    format(string, sizeof(string), "BCPD: %s has created a spike strip.", RPN(playerid));
    SendCopMessage(COLOR_BLUE, string);
    ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0); // Plant bomb
    return 1;
}

CMD:removespike(playerid, params[])
{
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(!IsACop(playerid) && !IsFBI(playerid) && !IsARES(playerid) && !IsAGov(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not a LEO.");
    if(PlayerInfo[playerid][pFacRank] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command. (Rank 4+)");
    DeleteClosestStrip(playerid);
    return 1;
}
e este codigo que arranjei, dб para furar peneus mas nao se adapta ao meu game mode :S vejam la o codigo:

pawn Код:
if(strcmp(cmd, "/deployspikes", true) == 0)
    {
        if(!IsACop(playerid) && !IsANG(playerid))
        {
            return SendClientMessage(playerid,COLOR_GREY,"You are not a Cop / FBI / SAST / NG.");
        }
        if(PlayerInfo[playerid][pMember] == 1)
        {
            if(PlayerInfo[playerid][pRank] < 4)
            {
                return SendClientMessage(playerid,COLOR_GREY,"Your rank is too low to be deploying spike strips.");
            }
        }
        else
        {
            if(PlayerInfo[playerid][pRank] < 5)
            {
                return SendClientMessage(playerid,COLOR_GREY,"   Your rank is too low to be removing spike strips !");
            }
        }
        if(IsPlayerInAnyVehicle(playerid))
        {
            return SendClientMessage(playerid,COLOR_GREY,"   You cannot place a spike strip while inside a vehicle !");
        }
        new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        GetPlayerPos(playerid,plocx,plocy,plocz);
        GetPlayerFacingAngle(playerid,ploca);
        new location[MAX_ZONE_NAME];
        GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
        new Float:x, Float:y, Float:z, Float:angle;
        GetPlayerFacingAngle(playerid, angle);
        GetPlayerPos(playerid, x, y, z);
        CreateStrip(x, y, z, angle);
        format(string, sizeof(string), "HQ: %s %s has placed a spike strip at %s", GetPlayerRank(playerid),PlayerName(playerid), location);
        SendRadioMessage(1, TEAM_BLUE_COLOR, string);
        SendRadioMessage(2, TEAM_BLUE_COLOR, string);
        SendRadioMessage(3, TEAM_BLUE_COLOR, string);
        SendRadioMessage(5, TEAM_BLUE_COLOR, string);
        ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0); // Plant bomb
        /*GetPlayerFacingAngle(playerid,ploca);
        CreateStrip(plocx,plocy,plocz,ploca);*/

        return 1;
    }
    if(strcmp(cmd, "/deletespike", true) == 0)
    {
        if(!IsACop(playerid) && !IsANG(playerid))
        {
            return SendClientMessage(playerid,COLOR_GREY,"   You are not a Cop / FBI / SAST / NG !");
        }
        if(PlayerInfo[playerid][pMember] == 1)
        {
            if(PlayerInfo[playerid][pRank] < 4)
            {
                return SendClientMessage(playerid,COLOR_GREY,"   Your rank is too low to be removing spike strips !");
            }
        }
        else
        {
            if(PlayerInfo[playerid][pRank] < 5)
            {
                return SendClientMessage(playerid,COLOR_GREY,"   Your rank is too low to be removing spike strips !");
            }
        }
        DeleteClosestStrip(playerid);
        return 1;
    }
eu queria que o meu codigo que й o primeiro, desse para furar peneus dos veiculos :S alguem me ajuda ? dou rep+
Reply


Messages In This Thread
Comando /Pregos - by MorreJaa - 11.02.2014, 23:32
Re: Comando /Pregos - by MorreJaa - 12.02.2014, 12:34
Re: Comando /Pregos - by DannielCooper - 12.02.2014, 15:06
Re: Comando /Pregos - by davi54723 - 12.02.2014, 17:35
Re: Comando /Pregos - by MorreJaa - 12.02.2014, 18:35
Re: Comando /Pregos - by PT - 12.02.2014, 19:57
Re: Comando /Pregos - by MorreJaa - 12.02.2014, 20:10
Re: Comando /Pregos - by DouglasRodrigues - 12.02.2014, 23:27
Re: Comando /Pregos - by MorreJaa - 13.02.2014, 16:49
Re: Comando /Pregos - by MorreJaa - 13.02.2014, 18:36

Forum Jump:


Users browsing this thread: 2 Guest(s)