12.11.2010, 04:03
pawn Код:
COMMAND:jackass( playerid, params [ ] )
{
if ( IsPlayerAdmin ( playerid ) )
{
new tPlayer;
if ( sscanf ( params, "u", tPlayer ) ) SendClientMessage ( playerid, 0xFFFFFFAA, "Usage : * ^ /jackass [ playerid | playername ] ^ * " );
else if ( tPlayer == INVALID_PLAYER_ID ) SendClientMessage ( playerid, 0xFFFFFFAA, "The selected player is not online " );
else
{
new
string [ 35 + MAX_PLAYER_NAME ],
pName [ MAX_PLAYER_NAME ];
GetPlayerName ( tPlayer, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), "%s ( %d ) is a jackass ! " , pName, tPlayer );
SendClientMessageToAll ( 0xFFFFFFAA, string );
format ( string, sizeof ( string ), "You have made %s ( %d ) a jackass. ", pName, tPlayer );
SendClientMessage ( playerid, 0xFFFFFFAA, string );
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), "%s ( %d ) has made you a jackass. ", pName, playerid );
SendClientMessage ( tPlayer, 0xFFFFFFAA, string );
}
}
else
{
new
string [ 25 + MAX_PLAYER_NAME ],
pName [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid, pName, sizeof ( pName ) );
format ( string, sizeof ( string ), "%s ( %d ) is a jackass ! ", pName, playerid );
SendClientMessageToAll ( 0xFFFFFFAA, string );
}
return 1;
}