SA-MP Forums Archive
HELP can't add giveplayermoney to fs - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: HELP can't add giveplayermoney to fs (/showthread.php?tid=245550)



HELP can't add giveplayermoney to fs - Tom1412 - 31.03.2011

the thing i dont understand is why i have it below with it on n the same gm but that gate dont work can anyone help me out please?


The FS
pawn Код:
#include <a_samp>

#define COLOR_BLUE1 0x0077dbff
#define COLOR_GREY 0xAFAFAFAA

new TollTimer[MAX_PLAYERS];
new Tollgate1;
new bool:Tollgate1Use;
forward GateClose();
forward GateAuto();

public OnFilterScriptInit( )
{
    Tollgate1 = CreateObject(976, 2216.3156738281, -1142.8746337891, 24.80749130249, 0.0000, 0.0000, 342.13500976563);
    print( "\n[FS] *************************" );
    print( "[FS] * Tom1412 Toll system *" );
    print( "[FS] * Loaded ...            *" );
    print( "[FS] *************************\n" );

    SetTimer("GateAuto",2000,1);
    return 1;
}
public OnPlayerConnect(playerid)
{
    TollTimer[playerid] = SetTimerEx("IsPlayerAtToll", 4000, true, "i", playerid);
}
public OnFilterScriptExit()
{
    DestroyObject(Tollgate1);
    return 1;
}

public GateAuto()
{
    if(!Tollgate1Use)
    {
        for(new i; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerInRangeOfPoint(i,20.0,2216.3156738281, -1142.8746337891, 24.80749130249))
            {
                Tollgate1Use = true;

                SetTimer("GateClose", 2000, 0);
                MoveObject(Tollgate1,2225.5759277344, -1146.0582275391, 24.80749130249, 6.5);
                return 1;
            }
        }
    }
    return 1;
}
forward IsPlayerAtToll(playerid);
public IsPlayerAtToll(playerid)
{
    if(!Tollgate1Use)
    {
        if(IsPlayerInRangeOfPoint(playerid, 5,2225.5759277344, -1146.0582275391, 24.80749130249))
        {
            Tollgate1Use = true;
            GivePlayerMoney(playerid, -5);
            SetTimer("GateClose", 2000, 0);
            MoveObject(Tollgate1,2225.5759277344, -1146.0582275391, 24.80749130249, 6.5);
            SendClientMessage(playerid, COLOR_BLUE1,"$5 payed \n have a nice day.");
        }
    }
    return 1;
}

public GateClose()
{
    Tollgate1Use = false;
    MoveObject (Tollgate1,2216.3156738281, -1142.8746337891, 24.80749130249, 3.5);
    return 1;
}



Re: HELP can't add giveplayermoney to fs - ronnie3148 - 31.03.2011

Ummm What GM are you using alot of them have anticheats that don't allow just GivePlayerMoney


Re: HELP can't add giveplayermoney to fs - Tom1412 - 31.03.2011

i test it on a stunt gm, but i made a command to make sure it takes cash it does but its not the bottom gate bit works its the auto gate tht does