Whi this script wont work?
#1

I downloaded this but it wont work
I putted all in my server but wont work:

pawn Код:
#define FILTERSCRIPT

#include <a_samp>
#include <dini>

#if defined FILTERSCRIPT

enum PoliceEnum
{
    bool:Use,
    Siren,
    Blue,
    Red,
    Value,
    Timer
};
new Police[MAX_VEHICLES][PoliceEnum];
forward OnPoliceSiren(vehicleid);

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" POLICE BEACON FILTER SCRIPT");
    print("--------------------------------------\n");
   
 
    return 1;
}


public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == 8192)
    {
        new car = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(car) == 470)
        {
           new param[7];
           GetVehicleParamsEx(car,param[0],param[1],param[2],param[3],param[4],param[5],param[6]);
           if(Police[car][Use] == false)
           {
                Police[car][Use]   = true;
                Police[car][Siren] = CreateObject(18646,0.0,0.0,0.0,0.0,0.0,0.0,0.0);
                Police[car][Blue]  = CreateObject(18648,0.0,0.0,0.0,0.0,0.0,0.0,0.0);
                Police[car][Red]   = CreateObject(18647,0.0,0.0,0.0,0.0,0.0,0.0,0.0);
                Police[car][Timer] = SetTimerEx("OnPoliceSiren",200,1,"d",car);
                AttachObjectToVehicle(Police[car][Siren],car,-0.8,0.2,1.1,0.0,0.0,0.0);
                SetVehicleParamsEx(car,1,param[1],param[2],param[3],param[4],param[5],param[5]);
            }
        }else{
        if(GetVehicleModel(car) == 489 || GetVehicleModel(car) == 528 || GetVehicleModel(car) == 420 || GetVehicleModel(car) == 597)
        {
           if(Police[car][Use] == false)
           {
                new param[7];
                Police[car][Use]   = true;
                Police[car][Siren] = CreateObject(18646,0.0,0.0,0.0,0.0,0.0,0.0,0.0);
                Police[car][Blue]  = CreateObject(18648,0.0,0.0,0.0,0.0,0.0,0.0,0.0);
                Police[car][Red]   = CreateObject(18647,0.0,0.0,0.0,0.0,0.0,0.0,0.0);
                Police[car][Timer] = SetTimerEx("OnPoliceSiren",200,1,"d",car);
                AttachObjectToVehicle(Police[car][Siren],car,-0.5,-0.2,0.7,0.0,0.0,0.0);
                SetVehicleParamsEx(car,1,param[1],param[2],param[3],param[4],param[5],param[5]);
            }
        }}
    }
    if(newkeys == 16384)
    {
        if(IsPlayerInAnyVehicle(playerid) == 1)
        {
            new car  = GetPlayerVehicleID(playerid);
            new param[7];
            GetVehicleParamsEx(car,param[0],param[1],param[2],param[3],param[4],param[5],param[6]);
            if(Police[car][Use] == true)
            {
                Police[car][Use] = false;
                AttachObjectToVehicle(Police[car][Siren],0,0.0,0.0,0.0,0.0,0.0,0.0);
                AttachObjectToVehicle(Police[car][Blue],0,0.0,0.0,0.0,0.0,0.0,0.0);
                AttachObjectToVehicle(Police[car][Red],0,0.0,0.0,0.0,0.0,0.0,0.0);
                DestroyObject(Police[car][Siren]);
                DestroyObject(Police[car][Blue]);
                DestroyObject(Police[car][Red]);
                KillTimer(Police[car][Timer]);
            }
        }
    }
    return 1;
}

public OnPoliceSiren(vehicleid)
{
    if(Police[vehicleid][Use] == true)
    {
        new param[4];
        GetVehicleDamageStatus(vehicleid,param[0],param[1],param[2],param[3]);
        if(Police[vehicleid][Value] == 0)
        {
            UpdateVehicleDamageStatus(vehicleid,param[0],param[1],1,param[3]);
            AttachObjectToVehicle(Police[vehicleid][Blue],vehicleid,0.7,0.0,-0.5,0.0,0.0,0.0);
            AttachObjectToVehicle(Police[vehicleid][Red],vehicleid,-0.7,0.0,-0.5,0.0,0.0,0.0);
            Police[vehicleid][Value] = 1;
        }
        else if(Police[vehicleid][Value] == 1)
        {
            UpdateVehicleDamageStatus(vehicleid,param[0],param[1],4,param[3]);
            AttachObjectToVehicle(Police[vehicleid][Blue],vehicleid,-0.7,0.0,-0.5,0.0,0.0,0.0);
            AttachObjectToVehicle(Police[vehicleid][Red],vehicleid,0.7,0.0,-0.5,0.0,0.0,0.0);
            Police[vehicleid][Value] = 0;
        }
    }
}
Reply
#2

you have dini.inc ?
Reply
#3

nope
Reply
#4

You need it..
Reply
#5

installed the 1.6 and still not working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)