Help me with somehting please
#1

Hello guys

I need this two cmds, To make into dmcd

Coz I am using G Admin And he works on it, So Can someone do it coz i dont know to work with dcmd..

Thanks!

pawn Код:
if(strcmp(cmd, "/respawnthiscar", true) == 0 || strcmp(cmd, "/rtc", true) == 0) // by Ellis
    {
      if(IsPlayerConnected(playerid))
      {
        if(PlayerInfo[playerid][pAdmin] < 2 )
            {
              SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");
              return 1;
            }
            if(IsPlayerInAnyVehicle(playerid))
            {
              GetPlayerName(playerid, sendername, sizeof(sendername));
              format(string, 256, "AdmWarning: %s has just respawned vehicle id %d.",sendername,GetPlayerVehicleID(playerid));
                ABroadCast(COLOR_YELLOW,string,1);
              SetVehicleToRespawn(GetPlayerVehicleID(playerid));
                RemovePlayerFromVehicle(playerid);
              SendClientMessage(playerid, COLOR_GREY, "  Vehicle Respawned !");
            }
        }
        return 1;
    }

    if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0) // by Ellis
    {
      if(IsPlayerConnected(playerid))
      {
        if(PlayerInfo[playerid][pAdmin] < 3)
            {
              SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");
              return 1;
            }
            new bool:unwanted[CAR_AMOUNT];
            for(new player=0; player<MAX_PLAYERS; player++)
        {
        if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
        }
            for(new car = 1; car <= 268; car++)
            {
                if(!unwanted[car]) SetVehicleToRespawn(car);
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "SERVER: All unused cars respawned by %s.", sendername);
            BroadCast(COLOR_WHITE,string);
        }
        return 1;
    }
Reply
#2

pawn Код:
dcmd_respawnthiscar(playerid, params[]) || strcmp(cmd, "/rtc", true) == 0) // by Ellis
    {
      #pragma unused params
      if(IsPlayerConnected(playerid))
      {
        if(PlayerInfo[playerid][pAdmin] < 2 )
            {
              SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");
              return 1;
            }
            if(IsPlayerInAnyVehicle(playerid))
            {
              GetPlayerName(playerid, sendername, sizeof(sendername));
              format(string, 256, "AdmWarning: %s has just respawned vehicle id %d.",sendername,GetPlayerVehicleID(playerid));
                ABroadCast(COLOR_YELLOW,string,1);
              SetVehicleToRespawn(GetPlayerVehicleID(playerid));
                RemovePlayerFromVehicle(playerid);
              SendClientMessage(playerid, COLOR_GREY, "  Vehicle Respawned !");
            }
        }
        return 1;
    }

    dcmd_respawnallcars(playerid, params[]) || strcmp(cmd, "/rac", true) == 0) // by Ellis
    {
      #pragma unused params
      if(IsPlayerConnected(playerid))
      {
        if(PlayerInfo[playerid][pAdmin] < 3)
            {
              SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");
              return 1;
            }
            new bool:unwanted[CAR_AMOUNT];
            for(new player=0; player<MAX_PLAYERS; player++)
        {
        if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
        }
            for(new car = 1; car <= 268; car++)
            {
                if(!unwanted[car]) SetVehicleToRespawn(car);
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "SERVER: All unused cars respawned by %s.", sendername);
            BroadCast(COLOR_WHITE,string);
        }
        return 1;
    }
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(respawnthiscar, 14, cmdtext);
    dcmd(respawnallcars, 14, cmdtext);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)