17.04.2014, 20:42
pawn Код:
stock IsAPedSkin()
{
new skinid;
if(skinid == 9||skinid == 14||skinid == 21||skinid == 22||skinid == 38||skinid == 39||skinid == 40||skinid == 41||skinid == 43||skinid == 44||skinid == 46||skinid == 47||skinid == 48||skinid == 54)
{
return 1;
}
if(skinid == 55||skinid == 56||skinid == 57||skinid == 58||skinid == 59||skinid == 60||skinid == 69||skinid == 76||skinid == 88||skinid == 89||skinid == 93||skinid == 94||skinid == 95||skinid == 98)
{
return 1;
}
if(skinid == 101||skinid == 136||skinid == 151||skinid == 169||skinid == 170||skinid == 183||skinid == 184||skinid == 185||skinid == 186||skinid == 188||skinid == 215||skinid == 216||skinid == 218)
{
return 1;
}
if(skinid == 221||skinid == 222||skinid == 223||skinid == 224||skinid == 225||skinid == 226||skinid == 228||skinid == 229||skinid == 231||skinid == 232||skinid == 233||skinid == 235||skinid == 236||skinid == 250||skinid == 263||skinid == 299)
{
return 1;
}
return 1;
}
CMD:buyclothes(playerid,params[])
{
new skinid;
if(!IsPlayerInRangeOfPoint(playerid, 5, 207.6668,-100.4377,1005.2578)) return SendClientMessage(playerid, COLOR_GRAD1,"You are not near a clothes shop counter.");
if(PlayerInfo[playerid][pMoney] <= 150) return SendClientMessage(playerid, COLOR_GRAD1,"You do not have enought money to purchase new clothes!");
if(sscanf(params,"i", skinid)) return SendClientMessage(playerid, COLOR_GRAD1,"USAGE: /buyclothes [skinid]");
if(IsAPedSkin())
{
SetPlayerSkin(playerid, skinid);
GivePlayerMoney(playerid, -150);
PlayerInfo[playerid][pMoney] = PlayerInfo[playerid][pMoney] - 150;
return 1;
}
return 1;
}