neeed help with skins
#6

pawn Код:
if(strcmp(cmd, "/setskin", true) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setskin [playerid/PartOfName] [skin model]");
                return 1;
            }
            new playa;
            new skin;
            playa = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            skin = strval(tmp);
            if(skin < 0 || skin > 299)
            {
                SendClientMessage(playerid, COLOR_GREY, "The Skin ID can't be below 0 or above 300 !");
                return 1;
            }
            if (PlayerInfo[playerid][pAdmin] >= 1338)
            {
              if(IsPlayerConnected(playa))
              {
                if(playa != INVALID_PLAYER_ID)
                {
                        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        giveplayerid = ReturnUser(tmp);
                        PlayerInfo[playa][pModel] = skin;
                        PlayerInfo[playa][pChar] = skin;
                        SetPlayerSkin(playa, PlayerInfo[playa][pChar]);
                        format(string, sizeof(string), "* You have changed the skin to %s !", giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* %s has changed your skin !", sendername);
                        SendClientMessage(playa, COLOR_LIGHTBLUE, string);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, ADMIN_TEXT);
                return 1;
            }
        }
        return 1;
    }
Reply


Messages In This Thread
neeed help with skins - by luckie12 - 30.04.2009, 16:24
Re: neeed help with skins - by Weirdosport - 30.04.2009, 16:29
Re: neeed help with skins - by luckie12 - 30.04.2009, 16:31
Re: neeed help with skins - by MenaceX^ - 30.04.2009, 16:39
Re: neeed help with skins - by luckie12 - 30.04.2009, 16:40
Re: neeed help with skins - by Danut - 30.04.2009, 19:03
Re: neeed help with skins - by HB - 30.04.2009, 19:07

Forum Jump:


Users browsing this thread: 1 Guest(s)