[FilterScript] Antifall System
#1

ANTIFALL SYSTEM:

CREDITS:

TeddyYeah ( me ) ;

HELP:

1.Go in your server filescripts folder;
2.Put AMX,PWN file;
3.Go in your server.cfg;
4.And put at filescripts line the name of filescript ; ( AntiFall ) ;

PHOTOS:

http://imgur.com/IpaIWSV ;
http://imgur.com/ToeX4pM ;

DOWNLOAD:

AntiFall.amx -- AMX ;
AntiFall.pwn -- PWN ;

SOLIDFILES:

http://www.solidfiles.com/d/84f36532...all_System.rar ;

HOW INSTALL HIM WITH PASTEBIN ?!

•At first line put
Код:
#include <a_samp>
•After that put #defines ;
Код:
#define FILTERSCRIPT
#if defined FILTERSCRIPT

#define Driver 0
#define Passanger 2
•Then put new;
Код:
new Act[MAX_PLAYERS];
new InCar[MAX_PLAYERS];
new WhatCar[MAX_PLAYERS];
•After that put
Код:
public OnFilterScriptInit()
        print("--------------------------------"); // this will show in your console;
        print(" Anti fall of bike bY Teddy ");          // this will show in your console;
        print("--------------------------------");// this will show in your console;
•After that all put
Код:
#endif
•After endif , next line put
Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
        InCar[playerid] = 0;
        return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
        if(Act[playerid] == 1)
        {
                if(oldstate == PLAYER_STATE_DRIVER)
                {
                        if(newstate == PLAYER_STATE_ONFOOT)
                        {
                                if(InCar[playerid] == 1)
                                {
                                        PutPlayerInVehicle(playerid, WhatCar[playerid], Driver);
                                }
                        }
                }
                if(oldstate == PLAYER_STATE_PASSENGER)
                {
                        if(newstate == PLAYER_STATE_ONFOOT)
                        {
                                if(InCar[playerid] == 1)
                                {
                                        PutPlayerInVehicle(playerid, WhatCar[playerid], Passanger);
                                }
                        }
                }
                if(oldstate == PLAYER_STATE_ONFOOT)
                {
                        if(newstate == PLAYER_STATE_DRIVER || PLAYER_STATE_PASSENGER)
                        {
                                InCar[playerid] = 1;
                                WhatCar[playerid] = GetPlayerVehicleID(playerid);
                        }
                }
        }
        return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
        if (strcmp("/afon", cmdtext, true) == 0) // this is command to make on anti-fall
        {
                Act[playerid] = 1;
                GameTextForPlayer(playerid, "~w~Anti fall ~g~activated", 5000, 5); // this will show when him is activated
                return 1;
        }
        if (strcmp("/afoff", cmdtext, true) == 0) // this is command to make off anti-fall
        {
                GameTextForPlayer(playerid, "~w~Anti fall ~r~dezactivated", 5000, 5); // this will show when him is dezactivated
                Act[playerid] = 0;
                return 1;
        }
        return 0;
}
http://pastebin.com/7G7ajG0S
Код:
http://pastebin.com/7G7ajG0S -- Link to Pastebin;
COMMANDS

/AFON -- make anti-fall on
/AFOFF -- make anti-fall off:




I HOPE YOU WILL ENJOY HIM



DON T REMOVE CREDITS!
ALL RIGHT RESERVED TO TEDDYYEAH!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)