ShowModelSelectionMenu help? - 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: ShowModelSelectionMenu help? (
/showthread.php?tid=608178)
ShowModelSelectionMenu help? -
N0FeaR - 28.05.2016
The selection menu won't show up maybe i doing something wrong i hope you guys are able to see what i am doing wrong.
PHP код:
new malepoliceskinlist = mS_INVALID_LISTID;
new femalepoliceskinlist = mS_INVALID_LISTID;
PHP код:
malepoliceskinlist = LoadModelSelectionMenu("malepoliceskins.txt");
femalepoliceskinlist = LoadModelSelectionMenu("femalepoliceskins.txt");
PHP код:
public OnPlayerModelSelection(playerid, response, listid, modelid)
{
if(listid == skins)
{
if(response)
{
SendClientMessage(playerid, 0xFF0000FF, "Skin Changed");
SetPlayerSkin(playerid, modelid);
}
else SendClientMessage(playerid, 0xFF0000FF, "Canceled skin selection");
}
if(listid == malepoliceskinlist)
{
if(response)
{
SendClientMessage(playerid, COLOR_WHITE, "Uniform Changed");
SetPlayerSkin(playerid, modelid);
}
else SendClientMessage(playerid, 0xFF0000FF, "Canceled skin selection");
return 1;
}
if(listid == femalepoliceskinlist)
{
if(response)
{
SendClientMessage(playerid, COLOR_WHITE, "Uniform Changed");
SetPlayerSkin(playerid, modelid);
}
else SendClientMessage(playerid, 0xFF0000FF, "Canceled skin selection");
return 1;
}
return 1;
}
PHP код:
malepoliceskinlist = LoadModelSelectionMenu("malepoliceskins.txt");
femalepoliceskinlist = LoadModelSelectionMenu("femalepoliceskins.txt");
PHP код:
switch(PlayerInfo[playerid][pGender])
{
case 1: // Male
{
ShowModelSelectionMenu(playerid, malepoliceskinlist, "Uniform");
}
case 2: // Female
{
ShowModelSelectionMenu(playerid, femalepoliceskinlist, "Uniform");
}
Re: ShowModelSelectionMenu help? -
luke49 - 28.05.2016
What is in your
malepoliceskins.txt and
femalepoliceskins.txt?