Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onScriptLoad()
- {
- myCheckpoint <- array( 500, null );
- LoadCheckpoints()
- {
- CreateCheckpoints();
- }
- }
- // Preparação
- function LoadCheckpoints()
- {
- // Aqui é pedir pra se foder; Criar manualmente :)
- myCheckpoint[0] = { Player = null, World = 1, IsSphere = true, Position = [ 141.977, -1363.74, 13.1827 ], RGB = [ 0, 0, 0 ], Radius = 20.0 }; // Tipo Shere
- myCheckpoint[1] = { Player = null, World = 1, IsSphere = false, Position = [ -975.007, -826.021, 6.80091 ], RGB = [ 0, 139, 139 ], Radius = 3.0 }; // Tipo Checkpoint
- }
- // Criação
- function CreateCheckpoints()
- {
- local MAX_CHECKPOINTS = myCheckpoint.len(), CP_COUNT = 0;
- while ( CP_COUNT <= MAX_CHECKPOINTS )
- {
- if ( myCheckpoint[CP_COUNT] )
- {
- local CP = myCheckpoint[CP_COUNT];
- CreateCheckpoint( CP["Player"], CP["World"], CP["IsSphere"], Vector( CP["Position"][0], CP["Position"][1], CP["Position"][2], ARGB( CP["RGB"][0], CP["RGB"][1], CP["RGB"][2], 255 ), CP["Radius"] ) );
- }
- CP_COUNT ++;
- }
- }
- function onCheckpointEntered( player, checkpoint )
- {
- local CP = myCheckpoint[ checkpoint.ID ];
- if ( CP["IsSphere"] ) PrivMessage( player, "Voce entrou em um checkpoint do tipo sphere." );
- else PrivMessage( player, "Voce entrou em um checkpoint normal." );
- }
- function onCheckpointExited( player, checkpoint )
- {
- local CP = myCheckpoint[ checkpoint.ID ];
- if ( CP["IsSphere"] ) PrivMessage( player, "Voce saiu de um checkpoint do tipo sphere." );
- else PrivMessage( player, "Voce saiu de um checkpoint normal." );
- }
Advertisement
Add Comment
Please, Sign In to add comment