28.05.2016, 16:21
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");
}