Setskin Command
#1

The command:
pawn Код:
CMD:setskin(playerid, params[])
{
    new Player, Skinid;
    if (sscanf(params, "ui", Player, Skinid))
    {
        SendClientMessage(playerid, COLOR_GREY, "[Command Usage]: /setskin [PlayerID or Name] [SkinID]");
    }
    else if (Player == INVALID_PLAYER_ID)
    {
        SendClientMessage(playerid, COLOR_GREY, "Invalid player name or id entered!");
    }
    else
    {
        if(IsPlayerConnected(playerid) && IsPlayerConnected(Player))
        {
            if(gPlayerLogged[playerid] == 1)
            {
                if(PlayerInfo[playerid][pAdminLevel] > 0)
                {
                    if(AdminDuty[playerid] == 1)
                    {
                        new playername[MAX_PLAYER_NAME], playername2[MAX_PLAYER_NAME], string[256], string2[256];
                        GetPlayerName(playerid, playername, sizeof(playername));
                        GetPlayerName(Player, playername2, sizeof(playername2));
                        format(string, sizeof(string), "Your skin has been set to %i by %s", Skinid, playername);
                        SendClientMessage(Player, COLOR_YELLOW, string);
                        format(string2, sizeof(string2), "You have set %s's skin to %i", playername2, Skinid);
                        SendClientMessage(playerid, COLOR_YELLOW, string2);
                        SetPlayerSkin(Player, Skinid);
                        PlayerInfo[Player][pSkin] = Skinid;
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GREY, "You must be on duty to perform this command");
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "You must be a moderator/administrator to perform this command");
                }
            }
        }
    }
    return 1;
}
I get no errors, but in game nothing happens, I made sure we were both logged in and connected, and I was on admin duty... Nothing happens no string no nothing... And the player doesn't get their skin set by the admin... Why is this? I get no errors...
Reply


Messages In This Thread
Setskin Command - by Dr - 01.08.2011, 03:16
Re: Setskin Command - by Kingunit - 01.08.2011, 03:27
Re: Setskin Command - by Dr - 01.08.2011, 03:50
Re: Setskin Command - by Famalamalam - 01.08.2011, 03:58
Re: Setskin Command - by Ironboy - 01.08.2011, 06:05
Re: Setskin Command - by iggy1 - 01.08.2011, 06:21
Re: Setskin Command - by Dr - 01.08.2011, 15:34
Re: Setskin Command - by AndreT - 01.08.2011, 15:44
Re: Setskin Command - by Dr - 01.08.2011, 16:01
Re: Setskin Command - by AndreT - 01.08.2011, 16:07
Re: Setskin Command - by Dr - 01.08.2011, 17:00
Re: Setskin Command - by Dr - 01.08.2011, 22:56
Re: Setskin Command - by =WoR=Varth - 02.08.2011, 00:09
Re: Setskin Command - by Dr - 02.08.2011, 02:10
Re: Setskin Command - by =WoR=Varth - 02.08.2011, 02:28

Forum Jump:


Users browsing this thread: 1 Guest(s)