Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Simple Signaling System v2
- Made by Edvin aka: xxSPEEDYxx. Keep the credits!
- You can signaling with Q( Left ) and E( Right ) Keys!
- */
- #include < a_samp >
- #pragma tabsize 0
- #define COLOR_PINK 0xFFC0CBAA
- #define COLOR_ULTRARED 0xE60000AA
- #define ANTISIGSPAM_TIME 5 // Number of secounds. 5 - 5 Secounds. You can change this to your own!
- forward AntiSpamTimer( id );
- new string[ 128 ];
- new AntiSigSpam[ MAX_PLAYERS ];
- public OnFilterScriptInit( )
- {
- print( "xxSPEEDYxx's Simple Signaling System v2 - LOADED!" );
- return 1;
- }
- public OnFilterScriptExit( )
- {
- print( "xxSPEEDYxx's Simple Signaling System v2 - UNLOADED!" );
- return 1;
- }
- public AntiSpamTimer( id )
- {
- AntiSigSpam[ id ] = 0;
- return 1;
- }
- public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
- {
- if ( newkeys == KEY_LOOK_RIGHT )
- {
- if ( IsPlayerInAnyVehicle ( playerid ) )
- {
- if ( AntiSigSpam[ playerid ] == 0 )
- {
- format ( string, sizeof ( string ), "{E60000}* %s {FFC0CB}has signaled to right( E ).", pname( playerid ) );
- SendClientMessageToAll( COLOR_PINK, string );
- format ( string, sizeof ( string ), "* >>>>>>>>>>> {E60000}%s {FFC0CB}>>>>>>>>>>>", pname( playerid ) );
- SendClientMessageToAll( COLOR_PINK, string );
- AntiSigSpam[ playerid ] = 1;
- SetTimerEx( "AntiSpamTimer", ANTISIGSPAM_TIME*1000, false, "d", playerid );
- }
- else
- {
- format( string, sizeof ( string ), "Anti-Spam!!!: Please wait {FFC0CB}%d {E60000}secounds to signaling again!", ANTISIGSPAM_TIME );
- SendClientMessage( playerid, COLOR_ULTRARED, string );
- }
- }
- }
- if ( newkeys == KEY_LOOK_LEFT )
- {
- if ( IsPlayerInAnyVehicle ( playerid ) )
- {
- if ( AntiSigSpam[ playerid ] == 0 )
- {
- format ( string, sizeof ( string ), "{E60000}* %s {FFC0CB}has signaled to left( Q ).", pname( playerid ) );
- SendClientMessageToAll( COLOR_PINK, string );
- format ( string, sizeof ( string ), "* <<<<<<<<<<< {E60000}%s {FFC0CB}<<<<<<<<<<<", pname( playerid ) );
- SendClientMessageToAll( COLOR_PINK, string );
- AntiSigSpam[ playerid ] = 1;
- SetTimerEx( "AntiSpamTimer", ANTISIGSPAM_TIME*1000, false, "d", playerid );
- }
- else
- {
- format( string, sizeof ( string ), "Anti-Spam!!!: Please wait {FFC0CB}%d {E60000}secounds to signaling again!", ANTISIGSPAM_TIME );
- SendClientMessage( playerid, COLOR_ULTRARED, string );
- }
- }
- }
- return 1;
- }
- stock pname( playerid )
- {
- new name[ MAX_PLAYER_NAME ];
- GetPlayerName( playerid, name, sizeof( name ) );
- return name;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement