/deployroadblock help please
#1

Hello My scripter made a mistake when he made the /deployroadblock
the problem is when we go IG, it does NOT show an object

Well here is the command
pawn Код:
if(strcmp(cmd, "/deployroadblock", true) == 0)
    {
        if(!IsACop(playerid) || PlayerInfo[playerid][pMember] == 5)
        {
            return SendClientMessage(playerid,COLOR_GREY,"   You are not a Cop / FBI / SASD / PG !");
        }
        if(PlayerInfo[playerid][pRank] < 1)
        {
           return SendClientMessage(playerid,COLOR_GREY,"   Your rank is too low to be Placing road blocks !");
        }
        if(IsPlayerInAnyVehicle(playerid))
        {
            return SendClientMessage(playerid,COLOR_GREY,"   You cannot place a road block 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);
        CreateRoadBlock(x, y, z, angle);
        format(string, sizeof(string), "HQ: %s %s has placed a roadblock 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);
        /*GetPlayerFacingAngle(playerid,ploca);
        CreateStrip(plocx,plocy,plocz,ploca);*/

        return 1;
Reply
#2

Post function: CreateRoadBlock(x, y, z, angle);
Sidenote: You're fetching the player's position and angle twice, for I don't know what reason.
Reply
#3

Can you do that in full code that I used please
Reply
#4

pawn Код:
if(strcmp(cmd, "/deployroadblock", true) == 0)
    {
        if(!IsACop(playerid) || PlayerInfo[playerid][pMember] == 5)
        {
            return SendClientMessage(playerid,COLOR_GREY,"   You are not a Cop / FBI / SASD / PG !");
        }
        if(PlayerInfo[playerid][pRank] < 1)
        {
           return SendClientMessage(playerid,COLOR_GREY,"   Your rank is too low to be Placing road blocks !");
        }
        if(IsPlayerInAnyVehicle(playerid))
        {
            return SendClientMessage(playerid,COLOR_GREY,"   You cannot place a road block 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);
        CreateObject(981, X, Y, Z, 0.0, 0.0, A+180);
        format(string, sizeof(string), "HQ: %s %s has placed a roadblock 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);
        /*GetPlayerFacingAngle(playerid,ploca);
        CreateStrip(plocx,plocy,plocz,ploca);*/

        return 1;
      }
Reply
#5

Thanks

This forum requires that you wait 120 seconds between posts. Please try again in 1 seconds. <---- FUUUUU ¬_¬
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)