05.03.2012, 12:55
(
Last edited by 2KY; 05/03/2012 at 01:52 PM.
)
I don't know about the rest of you, but a customized tab-list would make servers look a lot more organized in my opinion.
Being able to add groups to the tab-list (maybe with the ability to add hex-colours to them aswell, like dialogs & client messages?)
Functions could be like so, of course, you could rename/add/delete functions as you felt fit, I just think it'd be a nice suggestion for SA:MP '0.3e'
I wrote up a quick script on the TDM aspect using this;
Also drew up a diagram to go with said script...

Opinions?
Being able to add groups to the tab-list (maybe with the ability to add hex-colours to them aswell, like dialogs & client messages?)
Functions could be like so, of course, you could rename/add/delete functions as you felt fit, I just think it'd be a nice suggestion for SA:MP '0.3e'
pawn Code:
native CreateTabGroup( name[] );
new g_2KY = CreateTabGroup( "2KY" );
native SetTabGroupName ( groupid, name[] );
SetTabGroupName( g_2KY, "2KY_Renamed" );
native SetTabGroupColour ( groupid, colour );
SetTabGroupColour( g_2KY, 0xC70E11FF );
native SetPlayerTabGroup( playerid, groupid );
SetPlayerTabGroup( playerid, g_2KY );
native DeletePlayerTabGroup( playerid, groupid );
DeletePlayerTabGroup( playerid, g_2KY ); //This would 'kick' them out of the group 'g_2KY'
native GetPlayerTabGroup( playerid );
GetPlayerTabGroup( playerid );
native ShowTabGroupForPlayer( playerid, groupid );
ShowTabGroupForPlayer( playerid, g_2KY );
native HideTabGroupForPlayer( playerid, groupid );
HideTabGroupForPlayer( playerid, g_2KY );
native DeleteTabGroup( groupid );
DeleteTabGroup( g_2KY );
pawn Code:
new
p_ranTeam[MAX_PLAYERS] = -1;
public OnGameModeInit( )
{
new
GroupID[2]; //'0' and '1'
GroupID[0] = CreateTabGroup( "{C70E11}Attackers" );
GroupID[1] = CreateTabGroup( "{527D09}Defenders" );
return true;
}
public OnGameModeExit( )
{
DeleteTabGroup( GroupID[0] );
DeleteTabGroup( GroupID[1] );
}
public OnPlayerConnect( playerid )
{
p_ranTeam[playerid] = random(2);
switch( p_ranTeam[ playerid ] )
{
case 0: {
SendClientMessage( playerid, -1, "You have been randomly selected to be an Attacker!" );
SetPlayerTabGroup( playerid, GroupID[0] );
}
case 1: {
SendClientMessage( playerid, -1, "You have been randomly selected to be a Defender!" );
SetPlayerTabGroup( playerid, GroupID[1] );
}
}
return true;
}
public OnPlayerSpawn( playerid )
{
switch( p_ranTeam[ playerid ] )
{
case 0: SetPlayerPos( playerid, 0.0, 0.0, 10.0 );
case 1: SetPlayerPos( playerid, 20.0, 20.0, 10.0 );
}
return true;
}
public OnPlayerDisconnect( playerid, reason ) { return p_ranTeam[ playerid ] = -1; }

Opinions?

