07.05.2011, 05:26
Pessoal hб algum jeito de quando eu soltar um tapa em alguйm ai aparecer pros admins:
AdmCmd: O Admin %s deu um tapa em %s e perdeu 90% de HP
AdmCmd: O Admin %s deu um tapa em %s e perdeu 90% de HP
if( !strcmp( cmdtext, "/tapa", true ) )
{
if( IsPlayerConnected( playerid ) )
{
tmp = strtok( cmdtext, idx) ;
if( !strlen( tmp ) )
{
SendClientMessage( playerid, 0xFFFFFFFF, "USE: /tapa [Jogador]" );
return true;
}
new playa;
new Float: shealth;
new Float: slx, Float: sly, Float:s lz;
playa = ReturnUser(tmp);
if( IsPlayerAdmin( playerid ) )
{
if( IsPlayerConnected( playa ) )
{
if( playa != INVALID_PLAYER_ID )
{
GetPlayerName( playa, giveplayer, sizeof( giveplayer ) );
GetPlayerName( playerid, sendername, sizeof( sendername ) );
GetPlayerHealth( playa, shealth );
SetPlayerHealth( playa, shealth-90 );
GetPlayerPos( playa, slx, sly, slz );
SetPlayerPos( playa, slx, sly, slz+5 );,
PlayerPlaySound( playa, 1130, slx, sly, slz+5 );
printf( "AdmCmd: %s meteu um tapao em %s",sendername, giveplayer );
format( string, sizeof( string ), "AdmCmd: %s levou um tapa de %s e perdeu 90% de vida!",giveplayer ,sendername );
SendClientMessageToAll( 0xFF6347AA, string );
}
}
}
else
{
SendClientMessage( playerid, 0xFFFFFFFF, " Vocк nгo pode utilizar esse comando!" );
}
}
return true;
}
if( IsPlayerAdmin( playerid ) )
if( PlayerInfo[ playerid ][ kAdmin ] >= 1 )
if(strcmp(cmd, "/tapa", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /tapa [playerid]");
return 1;
}
new playa;
//new Float:shealth;
new Float:slx, Float:sly, Float:slz;
playa = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >=1)
{
if(modoadmin[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando!");
return 1;
}
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
//GetPlayerHealth(playa, shealth);
//SetPlayerHealth(playa, shealth-5);
GetPlayerPos(playa, slx, sly, slz);
SetPlayerPos(playa, slx, sly, slz+12);
PlayerPlaySound(playa, 1130, slx, sly, slz+12);
printf("AdmCmd: %s slapped %s",sendername, giveplayer);
if(modoadmin[playerid] == 1 || modoadmin[playerid] == 2)
{
format(string, sizeof(string), "AdmCmd: %s ganhou um tapa de: %s",giveplayer ,sendername);
}
ABroadCast(COLOR_LIGHTRED,string,1);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando!");
}
}
return 1;
}