Help with team selection
#1

When i press F4 and kill myself to go to team selection then it doesn't show me the teamselection menu which is in textdraws and it shows me CJ skin and sets my team to Team ID 0

I am not using onplayerequestclass etc callbacks

I want to make it such that when i press F4 it will show me my own team selection menu,any ideas on how to do this?
Reply
#2

pawn Код:
public OnPlayerRequestClass(....)
{
    SpawnPlayer(playerid);//To spawn the player
    ShowCustomClassSelection(playerid);//Create a stock function to set up the custom class selection.
    return 1;
}
Create a stock function to send the player to class selection at OnPlayerRequestClass.
Edit: I added Spawn Player as it will need to spawn him first.
Reply
#3

So without using OnPlayerRequestClass i can't make that happen?

This is my team selection,just a little script

Код:
if(clickedid == USAText)
	{
        TextDrawHideForPlayer(playerid,Team);
		TextDrawHideForPlayer(playerid,TeamBox);
		TextDrawHideForPlayer(playerid,USAText);
		TextDrawHideForPlayer(playerid,TalibanText);
		TextDrawShowForPlayer(playerid,Box);
		TextDrawShowForPlayer(playerid,Class);
		TextDrawShowForPlayer(playerid,Soldier);
		TextDrawShowForPlayer(playerid,JetTrooper);
		TextDrawShowForPlayer(playerid,Spy);
		TextDrawShowForPlayer(playerid,Sniper);
		SetPlayerTeam(playerid, 0);
		SelectTextDraw(playerid,COLOR_RED);
	}
Reply
#4

Quote:
Originally Posted by Nabster
Посмотреть сообщение
So without using OnPlayerRequestClass i can't make that happen?

This is my team selection,just a little script

Код:
if(clickedid == USAText)
	{
        TextDrawHideForPlayer(playerid,Team);
		TextDrawHideForPlayer(playerid,TeamBox);
		TextDrawHideForPlayer(playerid,USAText);
		TextDrawHideForPlayer(playerid,TalibanText);
		TextDrawShowForPlayer(playerid,Box);
		TextDrawShowForPlayer(playerid,Class);
		TextDrawShowForPlayer(playerid,Soldier);
		TextDrawShowForPlayer(playerid,JetTrooper);
		TextDrawShowForPlayer(playerid,Spy);
		TextDrawShowForPlayer(playerid,Sniper);
		SetPlayerTeam(playerid, 0);
		SelectTextDraw(playerid,COLOR_RED);
	}
This is OnPlayerClickTextDraw callback. If you want the player to see the custom class selection you first have to spawn him when he requests class (OnPlayerRequestClass) selection and than you have to send him to the custom class selection.
Reply
#5

well i can't get this to work and i think you don't understand what my problem is

I want to show the Team Selection menu when players presses F4 then kill or /switchteam then kill

Код:
public OnPlayerRequestClass(playerid,classid)
{
	if(PInfo[playerid][Logged] == 1)
	{
	    ShowCustomTeamSelection(playerid);
		TogglePlayerSpectating(playerid,1);
	}
	return 1;
}
Its not working,when i press F4 and kill myself it shows me CJ skin
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)