Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #include <a_samp>
- #if defined FILTERSCRIPT
- #define Verde 0x00FF00AA
- #define Vermelho 0xFF0000AA
- #define Branco 0xFFFFFFAA
- #define MaxPlayers 100
- new bool: kFaculdade[Max_PLAYERS];
- new kAvisos[MAX_PLAYERS]=0;
- new bool: kFaculdadeStatus;
- new kSemestre[MAX_PLAYERS];
- new kAulas[MAX_PLAYERS];
- new sStr[128];
- new sStr[0x3C*3];
- forward FaculdadeAberta(playerid);
- forward InfoFaculdade();
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Blank Filterscript by your name here");
- print("--------------------------------------\n");
- return 1;
- SetTimer("InfoFaculdade", 600000, true);
- SetTimer("FaculdadeAberta", 160000, true);
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" ");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- // Don't use these lines if it's a filterscript
- SetTimer("InfoFaculdade", 600000, true);
- SetTimer("FaculdadeAberta", 160000, true);
- return 1;
- }
- public OnPlayerText( playerid, text[] )
- {
- if(kFaculdade[playerid] == true)
- {
- kAvisos[ playerid ] += 1;
- format( sStr, sizeof( sStr ), "Não pode falar na faculdade! [Avisos: %d | Maximo: 3]", fAvisos[ playerid ] );
- SendClientMessage( playerid, Branco, sStr );
- if( kAvisos[ playerid ] >= 3 )
- {
- kAvisos[ playerid ] = 0;
- SetPlayerInterior( playerid, 0 );
- SpawnPlayer( playerid );
- kSemestre[ playerid ] -= 1;
- SendClientMessage( playerid, Vermelho, "Você foi expulso da Faculdade e perdeu 1 semestre!" );
- }
- return false;
- }
- return false;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/mycommand", cmdtext, true, 10) == 0)
- {
- // Do something here
- return 1;
- }
- return 0;
- }
- public InfoFaculdade()
- {
- if( FaculdadeStatus == true )
- {
- kFaculdadeStatus = false;
- SendClientMessageToAll( -1, "Faculdade Fechada!" );
- for( new i = 0; i <= MAX_PLAYERS; i++ )
- {
- if( kFaculdade[ i ] == true )
- {
- SpawnPlayer( i );
- }
- }
- }
- else
- {
- kFaculdadeStatus = true;
- SendClientMessageToAll( -1, "Faculdade Aberta!" );
- }
- return true;
- }
- public FaculdadeAberta( playerid )
- {
- for( new i = 0; i <= MAX_PLAYERS; i++ )
- {
- if( IsPlayerInRangeOfPoint( i, 12.0, -2029.5188,-116.4738,1035.1719) ) //Alterar coordenadas
- {
- if( kFaculdadeStatus == true )
- {
- kAulas[ i ]++;
- SendClientMessage( i, -1, "Uma aula foi adicionada ao seu curriculo (:" );
- if( kAulas[ playerid ] == 7 )
- {
- kAulas[ playerid ] = false;
- kSemestre[ playerid ]++;
- SendClientMessage( playerid, -1, "Você superou as 7 aulas, agora foi adicionado +1 semestre ao seu curriculo (:" );
- }
- }
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment