Command BuyClothes Problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Command BuyClothes Problem (
/showthread.php?tid=437504)
Command BuyClothes Problem -
chuck100 - 15.05.2013
Command BuyClothes Problem I did it from that tutorial :
https://sampforum.blast.hk/showthread.php?tid=407045
Heres the code , The problem is thats not show me nothing when I do the command :
Код:
CMD:buyclothes(playerid, params[])
{
if(IsAtClothShop(playerid))
{
ShowModelSelectionMenu(playerid, skinlist, "Select Skin");
return 1;
}
else
{
SendClientMessageEx( playerid, COLOR_WHITE, " You are not in a Clothing Shop!" );
}
skinlist = LoadModelSelectionMenu("skins.txt");
return 1;
}
Код:
public OnPlayerModelSelection(playerid, response, listid, modelid)
{
if(listid == skinlist)
{
if(response)
{
SetPlayerSkin(playerid, modelid);
if(GetPlayerCash(playerid) < 2500) return SendClientMessageEx(playerid, COLOR_GRAD2, "You can't afford these clothes!");
GameTextForPlayer(playerid, "~g~Skin purchased! ~n~ ~r~- $2500", 2000, 1);
GivePlayerCash(playerid, -2500);
}
else SendClientMessage(playerid, 0xFF0000FF, "Canceled skin selection");
return 1;
}
return 1;
}
Whats the problem and how to fix it ?
Re : Command BuyClothes Problem -
DaTa[X] - 15.05.2013
can you show the function " IsAtClothShop(playerid) "