Doriți să reacționați la acest mesaj? Creați un cont în câteva clickuri sau conectați-vă pentru a continua.

    [SA-MP]/setskin admin command

    eu
    eu
    Moderator Activ
    Moderator Activ


    Mesaje : 248
    Data de inscriere : 20/11/2010
    Varsta : 27
    Localizare : In Gandul Tau ~>

     [SA-MP]/setskin admin command Empty [SA-MP]/setskin admin command

    Mesaj  eu Mier Dec 01, 2010 5:21 pm

    In timp ce cautam cate ceva pentru un server de sa-mp am dat peste acest code care le da voie adminilor sa foloseasca /setskin [id] [skinid]

    Acest code il puneti in pawno in gamemode sau faceti un fs cu el:

    Cod:
    //----------------------------[Set Skin]----------------------------------------
        if(strcmp(cmd, "/setskin", true) == 0)
      {
          if(IsPlayerConnected(playerid))
          {
              if(PlayerInfo[playerid][pAdmin] >= 4)
              {
                  new tmp2[256];
                  tmp = strtok(cmdtext, idx);
                  new otherplayer = strval(tmp);
                  tmp2 = strtok(cmdtext, idx);
                  new skin = strval(tmp2);
                  if(!strlen(tmp))
                  {
                      SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setskin [id] [idskin]");
                      return 1;
                }
                if(!strlen(tmp2))
                  {
                      SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setskin [id] [idskin]");
                      return 1;
                }
                SetPlayerSkin(otherplayer, skin);
                SendClientMessage(otherplayer, COLOR_YELLOW, "An admin changed your skin.");
                new amsg[256];
                  GetPlayerName(playerid, playername, sizeof(playername));
                  format(amsg, sizeof(amsg), "%s changed the skin of .", playername);

            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "You are not admin !");
                return 1;
            }
          }
          return 1;
      }

    Good Luck Wink

      Data/ora curentă este: Vin Mai 17, 2024 10:43 am