11.12.2017, 17:45
Quote:
|
Nope you don't understand but thanks for reply.
As i already write above i know how to show skin directly but i want to show team first when select team like grove press spawn button it take it to the class section and show only grove skins. |
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
ShowPlayerDialog(playerid,DIALOG_STYLE_LIST,DIALOG_TEAMS,"DIALOG FOR TEAMS",DIALOGSTRING,"Accept","");
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
if(GetPlayerTeam(playerid) == POLICE_TEAM && GetPlayerSkin(playerid) != copskins(playerid))
{
SendClientMessage(playerid,-1,"NOT YOUR TEAM'S SKIN")
return 0;
}
return 1;
}
NOTE THIS: This code will NOT hide the skins for other teams BUT will disable the ability for players to choose other team skins, there's no point in hiding them if they can't choose them in the first place, unless if you just don't want them to scroll for unusable skins and that can't be done through onplayerrequestclass and onplayerrequstspawn you'll have to custom that on your own. Good luck.
EDIT: ANOTHER NOTE: If you show a LOGIN dialogue onplayerrequestclass, LET the player's login first THEN if they've not chosen a team before or they're registering LINK the choose team dialogue at the response of the login/register dialogue if success login player && showplayerdialogue DIALOG_TEAMS ...ETC, Good luck.


