05.09.2013, 22:56
Olб alguem tem como me passar um codigo, Tipo um flesh branco na tela do player quando passa no radar, Se alguem tiver agradeзo.
stock CheckInRadar( playerid, Float:xx, Float:yy, Float:zz, Float:radius, speed ) { if( IsPlayerInRangeOfPoint( playerid, radius, xx, yy, zz )) { if( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER && PassouRadar[ playerid ] == 0 ) { new t_speedY = GetPlayerSpeed( playerid, true ), f_speedY = GetPlayerSpeed( playerid, false ) ; if( t_speedY > speed ) { if( PassouRadar[ playerid ] == 0 ) { SendClientMessage( playerid, COLOR_AZULCLARO, "Ч Policia Rodoviaria Federal Ч" ); format( gstring, sizeof( gstring ), "• %s, vocк excedeu o limite de velocidade permitido neste local. Seguem os dados:", PlayerName( playerid )); SendClientMessage( playerid, COLOR_BRANCO, gstring ); format( gstring, sizeof( gstring ), "Ч Velocidade mбxima permitida: {FF0000}%d KM/H{FFFFFF}.", speed ); SendClientMessage( playerid, COLOR_BRANCO, gstring ); format( gstring, sizeof( gstring ), "Ч Velocidade detectada: {FF0000}%d KM/H{FFFFFF} | {FF0000}%d MP/H{FFFFFF}.", t_speedY, f_speedY ); SendClientMessage( playerid, COLOR_BRANCO, gstring ); format( gstring, sizeof( gstring ), "Ч Veнculo usado no momento da infraзгo: {FF0000}%s{FFFFFF}.", vNome[ GetVehicleModel( GetPlayerVehicleID( playerid )) - 400 ] ); SendClientMessage( playerid, COLOR_BRANCO, gstring ); format( gstring, sizeof( gstring ), "Ч Valor da multa: {00DD00}$ %d{FFFFFF}.", t_speedY * 2 ); SendClientMessage( playerid, COLOR_BRANCO, gstring ); TextDrawShowForPlayer( playerid, Flash ); GameTextForPlayer( playerid, "~r~RADAR", 2000, 5 ); SetTimerEx( "LiberarRadar", 5000, false, "d", playerid ); SetTimerEx( "FlashFotoSair", 1500, false, "d", playerid ); sGivePlayerCash( playerid, -t_speedY*2 ); PlayerPlaySound( playerid, 1132, 0.0, 0.0, 0.0 ); PassouRadar[ playerid ] = 1; } } else if( t_speedY < speed ) { if( PassouRadar[ playerid ] == 0 ) { GameTextForPlayer( playerid, "~y~RADAR", 2000, 5 ); format( gstring, sizeof( gstring ), "(( RADAR )) Ч Velocidade atual detectada: {FF0000}%d KM/H{FFFFFF} | {FF0000}%d MP/H{FFFFFF}.", t_speedY, f_speedY ); SendClientMessage( playerid, COLOR_AMARELOCLARO, gstring ); SetTimerEx( "LiberarRadar", 5000, false, "d", playerid ); PassouRadar[ playerid ] = 1; PlayerPlaySound( playerid, 1132, 0.0, 0.0, 0.0 ); } } } } }
forward UseFlashRadar();
public UseFlashRadar()
{
UseFlash = true;
Flash = TextDrawCreate(635.000000, 432.000000, "__");
TextDrawBackgroundColor(Flash, 255);
TextDrawFont(Flash, 1);
TextDrawLetterSize(Flash, 0.500000, -45.900001);
TextDrawColor(Flash, -256);
TextDrawSetOutline(Flash, 0);
TextDrawSetProportional(Flash, 1);
TextDrawSetShadow(Flash, 1);
TextDrawUseBox(Flash, 1);
TextDrawBoxColor(Flash, -86);
TextDrawTextSize(Flash, 6.000000, 35.000000);
return 1;
}
Achei isso aqui que pode ser muito ъtil
pawn Code:
Crйditos por ter achado: ViniKuliveguisky Post: https://sampforum.blast.hk/showthread.php?tid=177465 Exemplo do Flash: http://imageshack.us/f/832/anigifcre.gif/ Clica em cima da imagem para ver! |
O Meu tem isso,vou tentar pega o codigo pra vose !
Code:
stock CheckInRadar( playerid, Float:xx, Float:yy, Float:zz, Float:radius, speed ) { if( IsPlayerInRangeOfPoint( playerid, radius, xx, yy, zz )) { if( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER && PassouRadar[ playerid ] == 0 ) { new t_speedY = GetPlayerSpeed( playerid, true ), f_speedY = GetPlayerSpeed( playerid, false ) ; if( t_speedY > speed ) { if( PassouRadar[ playerid ] == 0 ) { SendClientMessage( playerid, COLOR_AZULCLARO, "Ч Policia Rodoviaria Federal Ч" ); format( gstring, sizeof( gstring ), "• %s, vocк excedeu o limite de velocidade permitido neste local. Seguem os dados:", PlayerName( playerid )); SendClientMessage( playerid, COLOR_BRANCO, gstring ); format( gstring, sizeof( gstring ), "Ч Velocidade mбxima permitida: {FF0000}%d KM/H{FFFFFF}.", speed ); SendClientMessage( playerid, COLOR_BRANCO, gstring ); format( gstring, sizeof( gstring ), "Ч Velocidade detectada: {FF0000}%d KM/H{FFFFFF} | {FF0000}%d MP/H{FFFFFF}.", t_speedY, f_speedY ); SendClientMessage( playerid, COLOR_BRANCO, gstring ); format( gstring, sizeof( gstring ), "Ч Veнculo usado no momento da infraзгo: {FF0000}%s{FFFFFF}.", vNome[ GetVehicleModel( GetPlayerVehicleID( playerid )) - 400 ] ); SendClientMessage( playerid, COLOR_BRANCO, gstring ); format( gstring, sizeof( gstring ), "Ч Valor da multa: {00DD00}$ %d{FFFFFF}.", t_speedY * 2 ); SendClientMessage( playerid, COLOR_BRANCO, gstring ); TextDrawShowForPlayer( playerid, Flash ); GameTextForPlayer( playerid, "~r~RADAR", 2000, 5 ); SetTimerEx( "LiberarRadar", 5000, false, "d", playerid ); SetTimerEx( "FlashFotoSair", 1500, false, "d", playerid ); sGivePlayerCash( playerid, -t_speedY*2 ); PlayerPlaySound( playerid, 1132, 0.0, 0.0, 0.0 ); PassouRadar[ playerid ] = 1; } } else if( t_speedY < speed ) { if( PassouRadar[ playerid ] == 0 ) { GameTextForPlayer( playerid, "~y~RADAR", 2000, 5 ); format( gstring, sizeof( gstring ), "(( RADAR )) Ч Velocidade atual detectada: {FF0000}%d KM/H{FFFFFF} | {FF0000}%d MP/H{FFFFFF}.", t_speedY, f_speedY ); SendClientMessage( playerid, COLOR_AMARELOCLARO, gstring ); SetTimerEx( "LiberarRadar", 5000, false, "d", playerid ); PassouRadar[ playerid ] = 1; PlayerPlaySound( playerid, 1132, 0.0, 0.0, 0.0 ); } } } } } |