09.01.2015, 19:22
So when you register you can select your own skin, but when you select skin you need press ESC to start moving.
Code
Code
PHP код:
HandlePlayerItemSelection(playerid, selecteditem)
{
new biz = PlayerInfo[playerid][pInBiz];
// In this case we change the player's skin
if(gSelectionItemsTag[playerid][selecteditem] >= 0 && gSelectionItemsTag[playerid][selecteditem] < 300) {
SetPlayerSkin(playerid, gSelectionItemsTag[playerid][selecteditem]);
if(gSelectionItemsTag[playerid][selecteditem] == 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "You can't choose CJ's skin");
if(GetPlayerCash(playerid) < 250) return SendClientMessageEx(playerid, COLOR_GRAD2, "You can't afford these clothes!");
PlayerPlaySound(playerid, 5453, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~g~Skin purchased! ~n~ ~r~- $250", 2000, 1);
GivePlayerCash(playerid, -250);
DestroySelectionMenu(playerid);
PlayerInfo[playerid][pModel] = gSelectionItemsTag[playerid][selecteditem];
if(BizInfo[biz][bOwned] == 1)
{
BizInfo[biz][bTill] += 500;
BizInfo[biz][bProducts]--;
}
}
return 1;
}
//This under public TutFinal
DestroySelectionMenu(playerid);
SetPVarInt(playerid, "skinc_active", 1);
CreateSelectionMenu(playerid);
SelectTextDraw(playerid, 0xACCBF1FF);