Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #if defined REACTION_TEST_BY_NAGAz00r
- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- | NaGaz000r REACTION TEST |
- | All rights RESERVED |
- | 2013 Version 1.0! |
- | |
- | |
- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- ////////////////////////////////////////////////////////////////////////////////
- #endif
- #include <a_samp>
- #include <sscanf2>
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- new NReactionChars[ ][ ] =
- {
- "a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","s","t","u","v","x","y","z",
- "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","S","T","U","V","X","Y","Z"
- };
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- #define PrizeScore 1000
- #define PrizeCash 5000
- #define ST SetTimer
- #define SMA SendClientMessageToAll
- #define ROSU 0xFF00000
- ////////////////////////////////////////////////////////////////////////////////
- new bool:NRIsStarted = false,
- NRTimerTicker = 0,
- NRMWords [ 5 ];
- forward NRTimer();
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" NaGaz000r Reaction Test System Loaded!");
- print("--------------------------------------\n");
- ST("NRTimer", 1200, true);
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- public NRTimer()
- {
- NRTimerTicker++;
- switch( NRTimerTicker )
- {
- case 60:
- {
- new nrSTR[ 128 ];
- if( !NRIsStarted )
- {
- format( NRMWords, sizeof( NRMWords ), "%s%s%s", NReactionChars[ random( sizeof( NReactionChars ) ) ], NReactionChars[ random( sizeof( NReactionChars ) ) ], NReactionChars[ random( sizeof( NReactionChars ) ) ] );
- format( nrSTR, sizeof( nrSTR ), "Who type first %s win 1000 score and 5000 cash!", NRMWords );
- SMA( ROSU, nrSTR );
- NRIsStarted = true;
- NRTimerTicker = 0;
- }
- }
- }
- }
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- public OnPlayerText(playerid, text[])
- {
- switch( NRIsStarted )
- {
- case true:
- {
- if( !strcmp( NRMWords, text ) )
- {
- new NRstr[ 56 ];
- format( NRstr, sizeof( NRstr ), "%s has won the reaction test", GetN( playerid ) );
- SMA( ROSU, NRstr );
- GivePlayerMoney(playerid, PrizeCash);
- SetPlayerScore(playerid, GetPlayerScore( playerid ) + PrizeScore); // ia sa vedem daca da erori :))
- printf( "%s", NRstr );
- NRTimerTicker = 30;
- NRIsStarted = false; // fuck :))
- }
- }
- }
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- stock GetN(playerid) // Get Name .. //
- {
- new NrName[ MAX_PLAYER_NAME ];
- GetPlayerName( playerid, NrName, sizeof( NrName ) );
- return NrName;
- }
- ////////////////////////////////////////////////////////////////////////////////
- #if defined REACTION_TEST_BY_NAGAz00r2
- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- | NaGaz000r REACTION TEST |
- | All rights RESERVED |
- | 2013 Version 1.0! |
- | END |
- | |
- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- #endif
- ////////////////////////////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment