26.11.2011, 15:45
pawn Код:
CMD:skin(playerid, params[])
{
if(LoggedIn[playerid] == 0) return SendClientMessage(playerid, COLOUR_GREY, "You must be logged in to use this command.");
new slot;
if(sscanf(params, "d", slot)) return SendClientMessage(playerid, COLOUR_GREY, "Usage: /skin [slot id] Slot id's range from 1 - 10");
if(IsPlayerInRangeOfPoint(playerid, 5.0, 958.1796, 2096.8029, 1011.0222) && Faction[playerid] == 3 && FRank[playerid] >= 1)
if(slot == 1)
{
FactionSkin1[Faction[playerid]] = MySQL_GetValue(FactionSkin1[Faction[playerid]], "FactionSkin1", "factions");
SetPlayerSkin(playerid, FactionSkin1[Faction[playerid]]);
}
if(slot == 2)
{
FactionSkin2[Faction[playerid]] = MySQL_GetValue(FactionSkin2[Faction[playerid]], "FactionSkin2", "factions");
SetPlayerSkin(playerid, FactionSkin2[Faction[playerid]]);
}
if(slot == 3)
{
FactionSkin3[Faction[playerid]] = MySQL_GetValue(FactionSkin3[Faction[playerid]], "FactionSkin2", "factions");
SetPlayerSkin(playerid, FactionSkin3[Faction[playerid]]);
}
if(slot == 4)
{
FactionSkin4[Faction[playerid]] = MySQL_GetValue(FactionSkin4[Faction[playerid]], "FactionSkin4", "factions");
SetPlayerSkin(playerid, FactionSkin4[Faction[playerid]]);
}
if(slot == 5)
{
FactionSkin5[Faction[playerid]] = MySQL_GetValue(FactionSkin5[Faction[playerid]], "FactionSkin5", "factions");
SetPlayerSkin(playerid, FactionSkin5[Faction[playerid]]);
}
if(slot == 6)
{
FactionSkin6[Faction[playerid]] = MySQL_GetValue(FactionSkin6[Faction[playerid]], "FactionSkin6", "factions");
SetPlayerSkin(playerid, FactionSkin6[Faction[playerid]]);
}
if(slot == 7)
{
FactionSkin7[Faction[playerid]] = MySQL_GetValue(FactionSkin7[Faction[playerid]], "FactionSkin7", "factions");
SetPlayerSkin(playerid, FactionSkin7[Faction[playerid]]);
}
if(slot == 8)
{
FactionSkin8[Faction[playerid]] = MySQL_GetValue(FactionSkin8[Faction[playerid]], "FactionSkin8", "factions");
SetPlayerSkin(playerid, FactionSkin8[Faction[playerid]]);
}
if(slot == 9)
{
FactionSkin9[Faction[playerid]] = MySQL_GetValue(FactionSkin9[Faction[playerid]], "FactionSkin9", "factions");
SetPlayerSkin(playerid, FactionSkin9[Faction[playerid]]);
}
if(slot == 10)
{
FactionSkin10[Faction[playerid]] = MySQL_GetValue(FactionSkin10[Faction[playerid]], "FactionSkin10", "factions");
SetPlayerSkin(playerid, FactionSkin10[Faction[playerid]]);
}
return 1;
}