Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //FS
- /* DAH SYSTEM */
- #include <a_samp>
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Dah System - Winter Edition -");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Dah System - Winter Edition -");
- print("----------------------------------\n");
- }
- #endif
- //stock za GetSpeed
- stock GetSpeed(playerid) {
- new Float:ST[4];
- if(IsPlayerInAnyVehicle(playerid))
- GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
- else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
- ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 178.8617875;
- return floatround(ST[3]); }
- //------------------------------------------------------------------------------ Dah system by Deksa
- //new
- new PlayerEffect[ MAX_PLAYERS ], PlayerRun[ MAX_PLAYERS ], EffectTimer[ MAX_PLAYERS ];
- #define OBJECT_SLOT_FREE 3
- forward ActionEffect();
- public ActionEffect() {
- for(new i; i < GetMaxPlayers(); i++) {
- if( GetPlayerInterior( i ) == 0 && GetPlayerVirtualWorld( i ) == 0 ) {
- RemovePlayerAttachedObject( i, OBJECT_SLOT_FREE );
- PlayerEffect[ i ] = SetPlayerAttachedObject( i, OBJECT_SLOT_FREE, 18696, 2,0.0,0.1,-0.2,-25.5000,0.0,0.0,0.10,0.3,0.15);
- if( GetSpeed( i ) > 10 && PlayerRun[ i ] == 0 ) {
- KillTimer( EffectTimer[ i ] );
- EffectTimer[ i ] = SetTimerEx("ActionEffect", 890, true, "d", i );
- PlayerRun[ i ] = 1; }
- else if( GetSpeed( i ) < 10 && PlayerRun[ i ] == 1 ) {
- KillTimer( EffectTimer[ i ] );
- EffectTimer[ i ] = SetTimerEx( "ActionEffect", 1900, true, "d", i );
- PlayerRun[ i ] = 0; } } } }
- //------------------------------------------------------------------------------
Add Comment
Please, Sign In to add comment