SA-MP Forums Archive
mSelection 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: mSelection Problem (/showthread.php?tid=586898)



mSelection Problem - SecretBoss - 26.08.2015

Hello guys I just created my skin system with mSelection include but I have to click 5-10 times on the same box to process the skin, codes

OnPlayerSpawn

Код:
if(PlayerInfo[playerid][pSkin] == 0)
    {
    	ShowModelSelectionMenu(playerid, skinlist, "Select Skin");
	}
	else if(PlayerInfo[playerid][pSkin] > 0)
	{
	    SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
	}
And response

Код:
public OnPlayerModelSelection(playerid, response, listid, modelid)
{
	if(listid == skinlist)
	{
	    if(!response)
	    {
	        ShowModelSelectionMenu(playerid, skinlist, "Select Skin");
	        SendError(playerid, "You must select your skin before playing on server");
		}
	    if(response)
	    {
		    SendMessage(playerid, COLOR_SERVER, "[SERVER] "white"You have successfully selected the Skin ID: %d", modelid);
	    	SetPlayerSkin(playerid, modelid);
			PlayerInfo[playerid][pSkin] = modelid;
	    }
    	return 1;
	}
	return 1;
}
what is wrong? Saving system is Y_Ini