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;
}
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(PlayerInfo[playerid][pAdminLevel] < 1)
{
SendClientMessage(playerid, COLOR_GREY, "You must be a administrator or moderator to use this command");
}
else if(AdminDuty[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GREY, "You must be on duty to perform this command");
}
else
{
new string[256], string2[256];
format(string, sizeof(string), "Your skin has been set to %i by %s", Skinid, GetPlayerNameEx(playerid));
SendClientMessage(Player, COLOR_YELLOW, string);
format(string2, sizeof(string2), "You have set %s's skin to %i", GetPlayerNameEx(Player), Skinid);
SendClientMessage(playerid, COLOR_YELLOW, string2);
SetPlayerSkin(Player, Skinid);
PlayerInfo[Player][pSkin] = Skinid;
}
return 1;
}
CMD:setskin(playerid, params[])
{
if(!PlayerInfo[playerid][pAdminLevel])
return SendClientMessage(playerid, COLOR_GREY, "You must be a administrator or moderator to use this command"), true;
if(AdminDuty[playerid] < 1)
return SendClientMessage(playerid, COLOR_GREY, "You must be on duty to perform this command"), true;
new Player, Skinid;
if(sscanf(params, "ui", Player, Skinid))
return SendClientMessage(playerid, COLOR_GREY, "[Command Usage]: /setskin [PlayerID or Name] [SkinID]"), true;
if(Player == INVALID_PLAYER_ID)
return SendClientMessage(playerid, COLOR_GREY, "Invalid player name or id entered!"), true;
new string[128];
format(string, sizeof(string), "Your skin has been set to %i by %s", Skinid, GetPlayerNameEx(playerid));
SendClientMessage(Player, COLOR_YELLOW, string);
format(string, sizeof(string), "You have set %s's skin to %i", GetPlayerNameEx(Player), Skinid);
SendClientMessage(playerid, COLOR_YELLOW, string);
SetPlayerSkin(Player, Skinid);
PlayerInfo[Player][pSkin] = Skinid;
return true;
}
CMD:setskin(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] >= 1)
{
if(AdminDuty[playerid] >= 1)
{
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
{
new string[256];
format(string, sizeof(string), "Your skin has been set to %i by %s", Skinid, GetPlayerNameEx(playerid));
SendClientMessage(Player, COLOR_YELLOW, string);
format(string, sizeof(string), "You have set %s's skin to %i", GetPlayerNameEx(Player), Skinid);
SendClientMessage(playerid, COLOR_YELLOW, string);
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 administrator or moderator to use this command");
}
return 1;
}
printf("Player -> %d", Player);
I have not updated it to the custom compiled one by zeex, where can I get it?
|