Jump to content
  • 0

RB sistem problema............


play2013

Question

1.Cand dau /rrball dispar pentru 3 secunde dupa care reapar la loc deci nu le pot scoate!

2.cu /rrb merg dar pe rand!

3.Cand dau /rb 2 de ex nu pot adauga decat maxim 35 cum as putea sa modific sa pot baga mai multe de ex 99999???

Ma ajutati va rog la problema nr 3 si nr 1

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

comanda /rb toatala

//----------------------------------------{RB]------------------------

if(strcmp(cmd, "/rb", true) == 0 || strcmp(cmd, "/roadblock", true) == 0)

{

    if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3  || PlayerInfo[playerid][pAdmin] >= 4)

    {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_WHITE, "{00A1FF}Info{FFFFFF}: /rb [Roadblock ID]");

SendClientMessage(playerid, COLOR_LIGHTBLUE, "Available Roadblocks:");

SendClientMessage(playerid, COLOR_GRAD1, "| 1: Small Roadblock | 2: Medium Roadblock |");

SendClientMessage(playerid, COLOR_GRAD1, "| 3: Big Roadblock | 4: Cone | 5: Detour Sign |");

SendClientMessage(playerid, COLOR_GRAD1, "| 6: Will Be Sign | 7: Line Closed Sign |");

SendClientMessage(playerid, COLOR_GRAD1, "| /spike || /rspike || /rallspikes - Tepi |");

SendClientMessage(playerid, COLOR_LIGHTBLUE, "| Scrie /rrb pentru a lua un semn,sau /rrball pentru a le lua pe toate. |");

return 1;

}

            new rb = strval(tmp);

            if (rb == 1)

{

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

GetPlayerName(playerid, sendername, sizeof(sendername));

new Float:plocx,Float:plocy,Float:plocz,Float:ploca;

        GetPlayerPos(playerid, plocx, plocy, plocz);

        GetPlayerFacingAngle(playerid,ploca);

        CreateRoadblock(1459,plocx,plocy,plocz,ploca);

        format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(1) at his position, over.",sendername);

        GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);

return 1;

}

else if (rb == 2)

{

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

GetPlayerName(playerid, sendername, sizeof(sendername));

new Float:plocx,Float:plocy,Float:plocz,Float:ploca;

        GetPlayerPos(playerid, plocx, plocy, plocz);

        GetPlayerFacingAngle(playerid,ploca);

        CreateRoadblock(978,plocx,plocy,plocz+0.6,ploca);

        format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(2) at his position, over.",sendername);

    GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);

return 1;

}

else if (rb == 3)

{

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

GetPlayerName(playerid, sendername, sizeof(sendername));

new Float:plocx,Float:plocy,Float:plocz,Float:ploca;

        GetPlayerPos(playerid, plocx, plocy, plocz);

        GetPlayerFacingAngle(playerid,ploca);

        CreateRoadblock(981,plocx,plocy,plocz+0.9,ploca+180);

        format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(3) at his position, over.",sendername);

        GameTextForPlayer(playerid,"~w~Roadblock ~g~Placed!",3000,1);

        SetPlayerPos(playerid, plocx, plocy+1.3, plocz);

return 1;

}

else if (rb == 4)

{

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

GetPlayerName(playerid, sendername, sizeof(sendername));

new Float:plocx,Float:plocy,Float:plocz,Float:ploca;

        GetPlayerPos(playerid, plocx, plocy, plocz);

        GetPlayerFacingAngle(playerid,ploca);

        CreateRoadblock(1238,plocx,plocy,plocz+0.2,ploca);

        format(string,sizeof(string),"[HQ]: Officer %s has placed a Traffic Cone(1) at his position, over.",sendername);

        GameTextForPlayer(playerid,"~w~Cone ~g~Placed!",3000,1);

return 1;

}

else if (rb == 5)

{

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

GetPlayerName(playerid, sendername, sizeof(sendername));

new Float:plocx,Float:plocy,Float:plocz,Float:ploca;

        GetPlayerPos(playerid, plocx, plocy, plocz);

        GetPlayerFacingAngle(playerid,ploca);

        CreateRoadblock(1425,plocx,plocy,plocz+0.6,ploca);

        format(string,sizeof(string),"[HQ]: Officer %s has placed a Detour Sign(4) at his position, over.",sendername);

        GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);

return 1;

}

else if (rb == 6)

{

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

GetPlayerName(playerid, sendername, sizeof(sendername));

new Float:plocx,Float:plocy,Float:plocz,Float:ploca;

        GetPlayerPos(playerid, plocx, plocy, plocz);

        GetPlayerFacingAngle(playerid,ploca);

        CreateRoadblock(3265,plocx,plocy,plocz-0.5,ploca);

        format(string,sizeof(string),"[HQ]: Officer %s has placed a Will Be Sign(5) at his position, over.",sendername);

        GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);

return 1;

}

else if (rb == 7)

{

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

GetPlayerName(playerid, sendername, sizeof(sendername));

new Float:plocx,Float:plocy,Float:plocz,Float:ploca;

        GetPlayerPos(playerid, plocx, plocy, plocz);

        GetPlayerFacingAngle(playerid,ploca);

        CreateRoadblock(3091,plocx,plocy,plocz+0.5,ploca+180);

        format(string,sizeof(string),"[HQ]: Officer %s has placed a Line Closed Sign(6) at his position, over.",sendername);

        GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);

return 1;

}

}

    return 1;

}

else if (strcmp(cmd,"/rrb",true) == 0)

{

    if(IsPlayerConnected(playerid) && IsACop(playerid) || PlayerInfo[playerid][pAdmin] >= 4)

    {

  roadb--;

        DeleteClosestRoadblock(playerid);

        GetPlayerName(playerid, sendername, sizeof(sendername));

        format(string,sizeof(string),"[HQ]: Officer %s has removed a Roadblock, over.",sendername);

        SendRadioMessage(1,COLOR_BLUE,string);

        GameTextForPlayer(playerid,"~w~Roadblock ~r~Removed!",3000,1);

}

    return 1;

}

if (strcmp(cmd,"/rrball",true) == 0 || strcmp(cmd, "/removeroadblockall", true) == 0)

{

    if(IsPlayerConnected(playerid) && IsACop(playerid)  || PlayerInfo[playerid][pAdmin] >= 4)

    {

if(PlayerInfo[playerid][pRank] >= 3 || PlayerInfo[playerid][pAdmin] >= 2) // This being the default Chief rank in LA-RP change if neccesary.

{

        DeleteAllRoadblocks(playerid);

        GetPlayerName(playerid, sendername, sizeof(sendername));

        format(string,sizeof(string),"[HQ]: Officer %s has removed all Roadblocks in the area, over.",sendername);

        GameTextForPlayer(playerid,"~b~All ~w~Roadblocks ~r~Removed!",3000,1);

}

}

    return 1;

}

Link to comment
Share on other sites

//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=CreateRoadblock=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

stock CreateRoadblock(Object,Float:x,Float:y,Float:z,Float:Angle)

{

    for(new i = 0; i < sizeof(Roadblocks); i++)

  {

      if(Roadblocks[sCreated] == 0)

      {

            Roadblocks[sCreated] = 1;

            Roadblocks[sX] = x;

            Roadblocks[sY] = y;

            Roadblocks[sZ] = z-0.7;

            Roadblocks[sObject] = CreateDynamicObject(Object, x, y, z-0.9, 0, 0, Angle);

        return 1;

      }

  }

  return 0;

}

//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=DeleteAllRoadblocks=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

stock HeadshotCheck(playerid, &Float:x, &Float:y, &Float:z)

{

new Float:fx,Float:fy,Float:fz;

GetPlayerCameraFrontVector(playerid, fx, fy, fz);

new Float:cx,Float:cy,Float:cz;

GetPlayerCameraPos(playerid, cx, cy, cz);

for(new Float:i = 0.0; i < 50; i = i + 0.5)

{

x = fx * i + cx;

y = fy * i + cy;

z = fz * i + cz;

for(new player = 0; player < MAX_PLAYERS; player ++)

{

    if(IsPlayerConnected(playerid))

    {

    if(player != playerid)

{

    if(GetPlayerSpecialAction(player) == SPECIAL_ACTION_DUCK) //CROUCHING

{

        if(IsPlayerInRangeOfPoint(player, 0.3, x, y, z))

        {

            GameTextForPlayer(playerid, "~r~HEADSHOT !", 2000, 6);

            GameTextForPlayer(player, "~r~HEADSHOT !", 2000, 6);

            SetPlayerHealth(player, 0.0);

            CallRemoteFunction("OnPlayerDeath", "ddd", player, playerid, 34);

        }

}

else

{

    if(IsPlayerInRangeOfPoint(player, 0.3, x, y, z - 0.7))

{

GameTextForPlayer(playerid, "~r~HEADSHOT !", 2000, 6);

GameTextForPlayer(player, "~r~HEADSHOT !", 2000, 6);

SetPlayerHealth(player, 0.0);

CallRemoteFunction("OnPlayerDeath", "ddd", player, playerid, 34);

}

}

}

}

}

}

return 1;

}

stock CreateStrip(Float:x,Float:y,Float:z,Float:Angle)

{

    for(new i = 0; i < sizeof(SpikeInfo); i++)

  {

      if(SpikeInfo[sCreated] == 0)

      {

            SpikeInfo[sCreated]=1;

            SpikeInfo[sX]=x;

            SpikeInfo[sY]=y;

            SpikeInfo[sZ]=z-0.7;

            SpikeInfo[sObject] = CreateObject(2899, x, y, z-0.9, 0, 0, Angle-90);

        return 1;

      }

  }

  return 0;

}

stock DeleteAllStrip()

{

    for(new i = 0; i < sizeof(SpikeInfo); i++)

  {

      if(SpikeInfo[sCreated] == 1)

      {

          SpikeInfo[sCreated]=0;

            SpikeInfo[sX]=0.0;

            SpikeInfo[sY]=0.0;

            SpikeInfo[sZ]=0.0;

            DestroyObject(SpikeInfo[sObject]);

      }

}

    return 0;

}

stock DeleteClosestStrip(playerid)

{

    for(new i = 0; i < sizeof(SpikeInfo); i++)

  {

      if(IsPlayerInRangeOfPoint(playerid, 2.0, SpikeInfo[sX], SpikeInfo[sY], SpikeInfo[sZ]))

        {

          if(SpikeInfo[sCreated] == 1)

            {

                SpikeInfo[sCreated]=0;

                SpikeInfo[sX]=0.0;

                SpikeInfo[sY]=0.0;

                SpikeInfo[sZ]=0.0;

                DestroyObject(SpikeInfo[sObject]);

                return 1;

          }

      }

  }

    return 0;

}

encode_tires(tires1, tires2, tires3, tires4) {

return tires1 | (tires2 << 1) | (tires3 << 2) | (tires4 << 3);

}

stock IsAFK( playerid )

{

new string[128],sendername[MAX_PLAYER_NAME];

    GetPlayerName(playerid,sendername,sizeof(sendername));

  if(Event[playerid])

  {

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.