De meglehet...
#include < a_samp >
new
szFormat[ 144 + 1 ],
szName[ MAX_PLAYER_NAME + 1 ];
public OnPlayerText( playerid, text[] )
{
if( text[ 0 ] == \'!\' )
{
if( GetPVarInt( playerid, \"Team\" ) == 1 )
{
GetPlayerName( playerid, szName, MAX_PLAYER_NAME );
format( szFormat, sizeof( szFormat ), \"[Valami1 Banda Chat]: %s(%d): %s\", szName, playerid, text[ 1 ] );
for( new iPlayer = 0; iPlayer < GetMaxPlayers( ); iPlayer++ )
{
if( IsPlayerConnected( iPlayer ) )
{
if( GetPVarInt( iPlayer, \"Team\" ) == 1 )
{
SendClientMessage( iPlayer, -1, szFormat );
}
}
}
return 0;
}
if( GetPVarInt( playerid, \"Team\" ) == 2 )
{
GetPlayerName( playerid, szName, MAX_PLAYER_NAME );
format( szFormat, sizeof( szFormat ), \"[Valami2 Banda Chat]: %s(%d): %s\", szName, playerid, text[ 1 ] );
for( new iPlayer = 0; iPlayer < GetMaxPlayers( ); iPlayer++ )
{
if( IsPlayerConnected( iPlayer ) )
{
if( GetPVarInt( iPlayer, \"Team\" ) == 2 )
{
SendClientMessage( iPlayer, -1, szFormat );
}
}
}
return 0;
}
}
return 0;
}
A változókat majd írd át a sajátodra.