Need a bit help about Teams
#4

Quote:
Originally Posted by MBilal
Посмотреть сообщение
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.
What i understood was you wanted players to choose a team THEN they can only play by the skins that team provides, here's what i can come up with, show player dialog onplayerrequestclass to choose a team, once they've done choosing they'll now switch between skins, put it all there and put under OnPlayerRequestSpawn the following: if the player's team is police and he chooses CIVILLIAN skin return SendClientMessage NOT YOUR TEAM SKIN and return 0; if you return 0 onplayerrequestpsawn he will not spawn by clicking on the spawn button, for EX:
PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
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;

IMPORTANT NOTES: Make sure that you put under OnPlayerRequestSpawn if the team is not chosen return 0; AND at the dialog response make sure to return showplayerdialog if the team hasn't been chosen as well to force them to choose a team, hope this helped!
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.
Reply


Messages In This Thread
Need a bit help about Teams - by MBilal - 10.12.2017, 15:02
Re: Need a bit help about Teams - by RowdyrideR - 10.12.2017, 21:22
Re: Need a bit help about Teams - by MBilal - 11.12.2017, 17:39
Re: Need a bit help about Teams - by RogueDrifter - 11.12.2017, 17:45
Re: Need a bit help about Teams - by Xeon™ - 11.12.2017, 17:49

Forum Jump:


Users browsing this thread: 1 Guest(s)