Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define filterscript
- forward LoadObjects( playerid );
- forward ObjectFinishLoad( playerid );
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" J'S Anti Spawn Fall ");
- print("--------PM ME IF YOU FOUND A BUG?------\n");
- print("--------------------------------------\n");
- return 1;
- }
- public LoadObjects( playerid )
- {
- if( IsPlayerConnected ( playerid ) )
- {
- TogglePlayerControllable( playerid, false );
- if( GetPlayerPing ( playerid ) < 100 ) {
- SetTimerEx( "ObjectFinishLoad", 5000, 0, "e", playerid );
- }
- else if( GetPlayerPing ( playerid ) > 100 ) {
- SetTimerEx( "ObjectFinishLoad", 3000, 0, "e", playerid );
- }
- else if( GetPlayerPing ( playerid ) > 200 ) {
- SetTimerEx( "ObjectFinishLoad", 3200, 0, "e", playerid );
- }
- else if( GetPlayerPing ( playerid ) > 300 ) {
- SetTimerEx( "ObjectFinishLoad", 3700, 0, "e", playerid );
- }
- else if( GetPlayerPing ( playerid ) > 500 ) {
- SetTimerEx( "ObjectFinishLoad", 4000, 0, "e", playerid );
- }
- else {
- SetTimerEx( "ObjectFinishLoad", 5000, 0, "e", playerid );
- }
- }
- return ( 1 );
- }
- public ObjectFinishLoad(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- TogglePlayerControllable( playerid, true );
- SendClientMessage(playerid, 0x2E8B57FF, "<Hey!>{00ff1d}You{ffffff}Can Go{ff002e}Now Goodluck!");
- PlayerPlaySound( playerid, 1056, 0.0, 0.0, 0.0 );
- }
- return (1);
- }
- public OnPlayerStateChange(playerid,newstate,oldstate)
- {
- if(newstate == PLAYER_STATE_SPAWNED)
- {
- LoadObjects( playerid );
- }
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print(" Thank you for using J'S FilterScript! ");
- print("--------------------------------------\n");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment