[help]Dcmd To ZCMD
#7

Quote:
Originally Posted by Desha1
Посмотреть сообщение
sorry again i want my gteam swat only can use it but there bug only /crb 1 its showing for gteam swat
PHP код:
CMD:crb(playerid,params[])
{
    
#pragma unused params
    
new rb strval(params);
    if (
rb == 1)
    if (
gTeam[playerid] == TEAM_SWAT)
    {
        
PlayerPlaySound(playerid10520.00.00.0);
        new 
Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        
GetPlayerPos(playeridplocxplocyplocz);
        
GetPlayerFacingAngle(playerid,ploca);
        
CreateRoadblock(1459,plocx,plocy,plocz,ploca);
        
GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
        return 
1;
    }
    else if (
rb == 2)
    {
        
PlayerPlaySound(playerid10520.00.00.0);
        new 
Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        
GetPlayerPos(playeridplocxplocyplocz);
        
GetPlayerFacingAngle(playerid,ploca);
        
CreateRoadblock(978,plocx,plocy,plocz+0.6,ploca);
        
GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
        return 
1;
    }
    else if (
rb == 3)
    {
        
PlayerPlaySound(playerid10520.00.00.0);
        new 
Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        
GetPlayerPos(playeridplocxplocyplocz);
        
GetPlayerFacingAngle(playerid,ploca);
        
CreateRoadblock(981,plocx,plocy,plocz+0.9,ploca+180);
        
GameTextForPlayer(playerid,"~w~Roadblock ~g~Placed!",3000,1);
        
SafeSetPlayerPos(playeridplocxplocy+5plocz);
        return 
1;
    }
    else if (
rb == 4)
    {
        
PlayerPlaySound(playerid10520.00.00.0);
        new 
Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        
GetPlayerPos(playeridplocxplocyplocz);
        
GetPlayerFacingAngle(playerid,ploca);
        
CreateRoadblock(1238,plocx,plocy,plocz+0.2,ploca);
        
GameTextForPlayer(playerid,"~w~Cone ~g~Placed!",3000,1);
        return 
1;
    }
    else if (
rb == 5)
    {
        
PlayerPlaySound(playerid10520.00.00.0);
        new 
Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        
GetPlayerPos(playeridplocxplocyplocz);
        
GetPlayerFacingAngle(playerid,ploca);
        
CreateRoadblock(1425,plocx,plocy,plocz+0.6,ploca);
        
GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
        return 
1;
    }
    else if (
rb == 6)
    {
        
PlayerPlaySound(playerid10520.00.00.0);
        new 
Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        
GetPlayerPos(playeridplocxplocyplocz);
        
GetPlayerFacingAngle(playerid,ploca);
        
CreateRoadblock(3265,plocx,plocy,plocz-0.5,ploca);
        
GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
        return 
1;
    }
    else if (
rb == 7)
    {
        
PlayerPlaySound(playerid10520.00.00.0);
        new 
Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        
GetPlayerPos(playeridplocxplocyplocz);
        
GetPlayerFacingAngle(playerid,ploca);
        
CreateRoadblock(3091,plocx,plocy,plocz+0.5,ploca+180);
        
GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
        return 
1;
    }
    return 
1;

put it right after "new rb = strval(params);" before " if (rb == 1)"
pawn Код:
if (gTeam[playerid] != TEAM_SWAT) return SendClientMessage(playerid,-1,"only SWAT can use this.");
and for the 3rd time, remove that pragma line
Reply


Messages In This Thread
[help]Dcmd To ZCMD - by Desha1 - 30.12.2014, 14:50
AW: [help]Dcmd To ZCMD - by CutX - 30.12.2014, 15:06
Re: [help]Dcmd To ZCMD - by Desha1 - 30.12.2014, 15:23
Re: [help]Dcmd To ZCMD - by Desha1 - 30.12.2014, 16:04
AW: Re: [help]Dcmd To ZCMD - by CutX - 30.12.2014, 16:08
Re: [help]Dcmd To ZCMD - by Desha1 - 30.12.2014, 16:48
AW: Re: [help]Dcmd To ZCMD - by CutX - 30.12.2014, 17:02

Forum Jump:


Users browsing this thread: 1 Guest(s)