Can't run my filterscript
#1

I can't run my filterscript. In server logs, it shows it's running. But I can't type commands. What is reason of it?
Here is my filterscipt...
Reply
#2

Try this,
pawn Код:
/* INCLUDES */
#include <a_samp>
#include <zcmd>
#include <sscanf2>

#define FILTERSCRIPT
    /* COLORS */
#define RED 0xFF0000AA
#define YELLOW 0xFFFF00AA
#define BLUE   0x00FFFFFF
#define ORANGE 0xFF8000FF

    /* PICKUPS */
new GYM;
new GYMEnter;
new GYMExit;
new AmmuNation;
new AmmuNationEnter;
new AmmuNationExit;
new Binco;
new BincoEnter;
new BincoExit;


public OnFilterScriptInit()
{
            /* PICKUPS */
    Binco = CreatePickup(1275, 1, 207.5, -101.5, 1005.3);
    BincoEnter = CreatePickup(1239, 1, 2244.8,-1664.5,15.5);
    BincoExit = CreatePickup(1239, 1, 207.5,-110.7,1005.1);
    AmmuNation = CreatePickup(1254, 1, 295.2, -37.6,1001.5);
    AmmuNationEnter = CreatePickup(1239, 1, 1368.7, -1279.8, 13.5);
    AmmuNationExit = CreatePickup(1239, 1, 285.3, -41.1, 1001.5);
    GYM = CreatePickup(1239, 1, 772.9, 5.5, 1000.8);
    GYMEnter = CreatePickup(1239, 1, 2229.8,-1721.5,13.6);
    GYMExit = CreatePickup(1239, 1, 772.3,-5.5,1000.7);
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    new buffer = pickupid;
    if(buffer == Binco)
    {
        SendClientMessage(playerid, YELLOW, "Type /clothes to buy new clothes.");
    }
    else if(buffer == AmmuNation)
    {
        SendClientMessage(playerid, YELLOW, "Type /buygun to buy guns.");
    }
    else if(buffer == GYM)
    {
        SendClientMessage(playerid, YELLOW, "Type /train to learn a fighting style.");
    }
    else if(buffer == BincoEnter || buffer == AmmuNationEnter || buffer == GYMEnter )
    {
        SendClientMessage(playerid, YELLOW, "Type /enter to enter to building.");
    }
    else if(buffer == BincoExit || buffer == AmmuNationExit || buffer == GYMExit )
    {
        SendClientMessage(playerid, YELLOW, "Type /exit to exit from building.");
    }
    return 1;
}
public OnDialogResponse (playerid,dialogid, response, listitem, inputtext[])
{
    if(dialogid == 0)
    {
        if(response == 0) return SendClientMessage(playerid,YELLOW,"You need to write a skin id.");
        new skin = strval(inputtext);
        SetPlayerSkin(playerid, skin);
    }
    if(dialogid == 1)
    {
        if(response == 0) return SendClientMessage(playerid,YELLOW,"You didn't choose anything.");
        switch(listitem)
        {
            case 0:
            {
            new buffer = GetPlayerWeapon(playerid);
            if(GetPlayerMoney(playerid) < 150 ) {SendClientMessage(playerid, YELLOW, "You can't afford it, you should have $150.");}
            else if (buffer == 22 || buffer == 23 || buffer == 24) {SendClientMessage(playerid, YELLOW, "You have another gun in that Slot.");}
            else {GivePlayerWeapon(playerid, 22, 10000); GivePlayerMoney(playerid, -150); SendClientMessage(playerid, YELLOW, "You bought a Colt45.");}
            }
            case 1:
            {
                new buffer = GetPlayerWeapon(playerid);
                if(GetPlayerMoney(playerid) < 250 ) {SendClientMessage(playerid, YELLOW, "You can't afford it, you should have $250.");}
                else if (buffer == 25 || buffer == 26 || buffer == 27) {SendClientMessage(playerid, YELLOW, "You have another gun in that Slot.");}
                else {GivePlayerWeapon(playerid, 25, 10000); GivePlayerMoney(playerid, -250); SendClientMessage(playerid, YELLOW, "You bought a Shotgun.");}
            }
            case 2:
            {
                new buffer = GetPlayerWeapon(playerid);
                if(GetPlayerMoney(playerid) < 400 ) {SendClientMessage(playerid, YELLOW, "You can't afford it, you should have $400.");}
                else if (buffer == 28 || buffer == 29 || buffer == 32) {SendClientMessage(playerid, YELLOW, "You have another gun in that Slot.");}
                else {GivePlayerWeapon(playerid, 29, 10000); GivePlayerMoney(playerid, -400); SendClientMessage(playerid, YELLOW, "You bought a MP5.");}
            }
            case 3:
            {
                new buffer = GetPlayerWeapon(playerid);
                if(GetPlayerMoney(playerid) < 1200 ) {SendClientMessage(playerid, YELLOW, "You can't afford it, you should have $1200.");}
                else if (buffer == 22 || buffer == 23 || buffer == 24) {SendClientMessage(playerid, YELLOW, "You have another gun in that Slot.");}
                else {GivePlayerWeapon(playerid, 24, 10000); GivePlayerMoney(playerid, -1200); SendClientMessage(playerid, YELLOW, "You bought a Deagle.");}
            }
            case 4:
            {
                new buffer = GetPlayerWeapon(playerid);
                if(GetPlayerMoney(playerid) < 2000 ) {SendClientMessage(playerid, YELLOW, "You can't afford it, you should have $2000.");}
                else if (buffer == 30 || buffer == 31) {SendClientMessage(playerid, YELLOW, "You have another gun in that Slot.");}
                else {GivePlayerWeapon(playerid, 31, 10000); GivePlayerMoney(playerid, -2000); SendClientMessage(playerid, YELLOW, "You bought a M4.");}
            }
            case 5:
            {
                new buffer = GetPlayerWeapon(playerid);
                if(GetPlayerMoney(playerid) < 5000 ) {SendClientMessage(playerid, YELLOW, "You can't afford it, you should have $5000.");}
                else if (buffer == 25 || buffer == 26 || buffer == 27) {SendClientMessage(playerid, YELLOW, "You have another gun in that Slot.");}
                else {GivePlayerWeapon(playerid, 27, 10000); GivePlayerMoney(playerid, -5000); SendClientMessage(playerid, YELLOW, "You bought a SPAS12.");}
            }
        }
    }
    if(dialogid == 2)
    {
        if(response == 0) return SendClientMessage(playerid, YELLOW,"You didn't choose anything.");
        switch(listitem)
        {
            case 0:
            {
                if (GetPlayerFightingStyle(playerid) == FIGHT_STYLE_NORMAL) {SendClientMessage(playerid, YELLOW, "You have same fighting style as your fighting style.");}
                else {SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL); SendClientMessage(playerid, YELLOW, "You learned Normal fighting Style.");}
            }
            case 1:
            {
                if(GetPlayerMoney(playerid) < 1000 ) {SendClientMessage(playerid, YELLOW, "You can't afford it, you should have $1000.");}
                else if (GetPlayerFightingStyle(playerid) == FIGHT_STYLE_BOXING) {SendClientMessage(playerid, YELLOW, "You have same fighting style as your fighting style.");}
                else {SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING); GivePlayerMoney(playerid, -1000); SendClientMessage(playerid, YELLOW, "You learned Boxing.");}
            }
            case 2:
            {
                if(GetPlayerMoney(playerid) < 1000 ) {SendClientMessage(playerid, YELLOW, "You can't afford it, you should have $1000.");}
                else if (GetPlayerFightingStyle(playerid) == FIGHT_STYLE_KUNGFU) {SendClientMessage(playerid, YELLOW, "You have same fighting style as your fighting style.");}
                else {SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU); GivePlayerMoney(playerid, -1000); SendClientMessage(playerid, YELLOW, "You learned Kung Fu.");}
            }
            case 3:
            {
                if(GetPlayerMoney(playerid) < 1000 ) {SendClientMessage(playerid, YELLOW, "You can't afford it, you should have $1000.");}
                else if (GetPlayerFightingStyle(playerid) == FIGHT_STYLE_KNEEHEAD) {SendClientMessage(playerid, YELLOW, "You have same fighting style as your fighting style.");}
                else {SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD); GivePlayerMoney(playerid, -1000); SendClientMessage(playerid, YELLOW, "You learned Kneehead.");}
            }
            case 4:
            {
                if(GetPlayerMoney(playerid) < 1000 ) {SendClientMessage(playerid, YELLOW, "You can't afford it, you should have $1000.");}
                else if (GetPlayerFightingStyle(playerid) == FIGHT_STYLE_GRABKICK) {SendClientMessage(playerid, YELLOW, "You have same fighting style as your fighting style.");}
                else {SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK); GivePlayerMoney(playerid, -1000); SendClientMessage(playerid, YELLOW, "You learned Grabkick.");}
            }
            case 5:
            {
                if(GetPlayerMoney(playerid) < 1000 ) {SendClientMessage(playerid, YELLOW, "You can't afford it, you should have $1000.");}
                else if (GetPlayerFightingStyle(playerid) == FIGHT_STYLE_ELBOW) {SendClientMessage(playerid, YELLOW, "You have same fighting style as your fighting style.");}
                else {SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW); GivePlayerMoney(playerid, -1000); SendClientMessage(playerid, YELLOW, "You learned Elbow.");}
            }
        }
    }
    return 1;
}

    /* BUY */
CMD:clothes(playerid, params[])
{
    if(!IsPlayerInRangeOfPoint(playerid,1.0, 207.5, -101.5, 1005.3)) return SendClientMessage(playerid, ORANGE,"You have to be in Binco");
    else ShowPlayerDialog(playerid, 0, DIALOG_STYLE_INPUT, "Binco", "Welcome to Binco, please buy your clothes.", "Buy", "Cancel");
    return 1;
}
CMD:buygun(playerid, params[])
{
    if(!IsPlayerInRangeOfPoint(playerid,1.0, 295.2, -37.6,1001.5)) return SendClientMessage(playerid, ORANGE,"You have to be in Ammu Nation");
    else ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Welcome to Ammu Nation, please buy your gun.", "Colt45($150)\nShotgun($250)\nMP5($400)\nDeagle($1200)\nM4($2000)\nCombat Shotgun($10000)", "Buy", "Cancel");
    return 1;
}
CMD:train(playerid, params[])
{
    if(!IsPlayerInRangeOfPoint(playerid,1.0, 772.9, 5.5, 1000.8)) return SendClientMessage(playerid, ORANGE,"You have to be in Ganton GYM");
    else ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Welcome to GYM, please select a fight style to learn.", "Normal\nBox ($1000)\nKung-Fu ($1000)\nKneehead ($1000)\nGrabkick ($1000)\nElbow ($1000)", "Buy", "Cancel");
    return 1;
}
    /* ENTER and EXIT */
CMD:enter(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid,1.0, 2244.8,-1664.5,15.5)) return SetPlayerPos(playerid, 207.5,-110.7,1005.1 ); // BincoEnter
    else if(IsPlayerInRangeOfPoint(playerid,1.0, 1368.7, -1279.8, 13.5)) return SetPlayerPos(playerid, 285.3, -41.1, 1001.5); // AmmuNationEnter
    else if(IsPlayerInRangeOfPoint(playerid,1.0, 2229.8,-1721.5,13.6)) return SetPlayerPos(playerid, 772.3,-5.5,1000.7); // GYMEnter
    else return SendClientMessage(playerid, BLUE,"You should be at enterance of a building");
}
CMD:exit(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid,1.0, 207.5,-110.7,1005.1)) return SetPlayerPos(playerid, 2244.8,-1664.5,15.5); // BincoEnter
    else if(IsPlayerInRangeOfPoint(playerid,1.0, 285.3, -41.1, 1001.5)) return SetPlayerPos(playerid, 1368.7, -1279.8, 13.5); // AmmuNationEnter
    else if(IsPlayerInRangeOfPoint(playerid,1.0, 772.3,-5.5,1000.7)) return SetPlayerPos(playerid, 2229.8,-1721.5,13.6); // GYMEnter
    else return SendClientMessage(playerid, BLUE,"You should be at exit door of a building");
}
    /* TO TEST */
CMD:mon(playerid, params[])
{
    GivePlayerMoney(playerid,50000);
    return 1;
}

    /* ADMINS */
CMD:toammu(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        SetPlayerPos(playerid,-2110,162,35);
        SendClientMessage(playerid, BLUE, "You have teleported to Ammu Nation, use /buygun to buy guns");
    }
    else return SendClientMessage(playerid, ORANGE,"You are not authorized to use this command.");
    return 1;
}
CMD:togym(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        SetPlayerPos(playerid,-2110,162,35);
        SendClientMessage(playerid, BLUE, "You have teleported to Ganton GYM, use /train to train");
    }
    else return SendClientMessage(playerid, ORANGE,"You are not authorized to use this command.");
    return 1;
}
CMD:tobinco(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        SetPlayerPos(playerid,-2110,162,35);
        SendClientMessage(playerid, BLUE, "You have teleported to Ganton GYM, use /clothes to buy skins");
    }
    else return SendClientMessage(playerid, ORANGE,"You are not authorized to use this command.");
    return 1;
}
Reply
#3

Infinity90 - Now Pawno can't compile it. Windows gives error message.
Reply
#4

Quote:
Originally Posted by DragonYancy
Посмотреть сообщение
Infinity90 - Now Pawno can't compile it. Windows gives error message.
what error
Reply
#5

Quote:
Originally Posted by milanosie
Посмотреть сообщение
what error
Pawno stops running, no explanitions...
Reply
#6

Quote:
Originally Posted by DragonYancy
Посмотреть сообщение
Pawno stops running, no explanitions...
compiles fine for me
Reply
#7

Now I can run, I found the problem.
But I can't write commands which are in my fs like /buygun or /tobinco. When I write them says me "SERVER: Unknown command"
Reply
#8

man i have the same problem with pwn if i copy paster files from pastebin pwn stops working for unknown reason pisses me off
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)