weightbridge help :)
#1

hi all aRoach has scripted me this thing and i have edited to my needs but when i go onto weightbridge it dont do anything what so ever any help ? it doesnt send the messages or check if player is overloaded.

pawn Код:
// credits to aRoach,[LHT]Bally Do Not Remove These
        #include <a_samp>
        #include <streamer>
        #define Public:%0(%1) forward %0(%1);\
                                      public %0(%1)
       
    public OnFilterScriptInit( )
    {
            print( "\n--------------------------------------" );
            print( "Weight Bridge By aRoach and [LHT]Bally "  );
            print( "Loading [v0.5]" );
            print( "--------------------------------------\n" );

            CreateDynamicObject(3406, 1286, 836.40002441406, 4.9000000953674, 0, 0, 1);
            CreateDynamicObject(3406, 1286, 834.40002441406, 4.9000000953674, 0, 0, 0.999755859375);
            CreateDynamicObject(3406, 1286, 833.09997558594, 4.9000000953674, 0, 0, 0.999755859375);
            CreateDynamicObject(3406, 1294.6999511719, 836.59997558594, 4.9000000953674, 0, 0, 0.999755859375);
            CreateDynamicObject(3406, 1294.6999511719, 834.59997558594, 4.9000000953674, 0, 0, 0.999755859375);
            CreateDynamicObject(3406, 1294.8000488281, 833.29998779297, 4.9000000953674, 0, 0, 0.999755859375);
            CreateDynamicObject(3406, 1283.1999511719, 836.29998779297, 4.9000000953674, 0, 0, 0.999755859375);
            CreateDynamicObject(3406, 1283.1999511719, 834.29998779297, 4.9000000953674, 0, 0, 0.999755859375);
            CreateDynamicObject(3406, 1283.1999511719, 833, 4.9000000953674, 0, 0, 0.999755859375);
            CreateDynamicObject(3578, 1283.4000244141, 831.5, 7.5, 0, 0, 1.75);
            CreateDynamicObject(3578, 1293.6999511719, 831.79998779297, 7.5, 0, 0, 1.746826171875);
            CreateDynamicObject(3578, 1293.8000488281, 827.70001220703, 7.5, 0, 0, 1.746826171875);
            CreateDynamicObject(3578, 1283.5999755859, 827.40002441406, 7.5, 0, 0, 1.746826171875);
            CreateDynamicObject(973, 1275.1999511719, 824.20001220703, 7.8000001907349, 0, 0, 42);
            CreateDynamicObject(3406, 1294.5999755859, 838.40002441406, 4.9000000953674, 0, 0, 0.999755859375);
            CreateDynamicObject(3406, 1285.8000488281, 838.29998779297, 4.9000000953674, 0, 0, 0.999755859375);
            CreateDynamicObject(3406, 1283.1999511719, 838.20001220703, 4.9000000953674, 0, 0, 0.999755859375);
            CreateDynamicObject(3578, 1293.4000244141, 839, 7.5, 0, 0, 1.496826171875);
            CreateDynamicObject(3578, 1283.0999755859, 838.70001220703, 7.5, 0, 0, 1.746826171875);
            CreateDynamicObject(973, 1275.4000244141, 842.20001220703, 7.8000001907349, 0, 0, 126.99523925781);
            CreateDynamicObject(8168, 1294.8000488281, 842, 8.6999998092651, 0, 0, 18);
            CreateDynamicObject(8168, 1295.4000244141, 824.70001220703, 8.6999998092651, 0, 0, 197.74562072754);
            CreateDynamicObject(8843, 1278.5999755859, 829.20001220703, 6.9000000953674, 359.75, 0, 272);
            CreateDynamicObject(8843, 1268.8000488281, 834.5, 7.0999999046326, 359.74731445313, 0, 271.99951171875);
            CreateDynamicObject(1298, 1278.9000244141, 832.20001220703, 10.300000190735, 0, 0, 257.75);
            CreateDynamicObject(1298, 1280.9000244141, 832.20001220703, 10.300000190735, 0, 0, 257.74963378906);
            CreateDynamicObject(1298, 1283.4000244141, 832.20001220703, 10.300000190735, 0, 0, 257.74475097656);
            CreateDynamicObject(1298, 1288.0999755859, 832.40002441406, 10.300000190735, 0, 0, 257.74475097656);
            CreateDynamicObject(1298, 1291.5999755859, 832.5, 10.300000190735, 0, 0, 257.74475097656);
            CreateDynamicObject(1298, 1296.9000244141, 832.59997558594, 10.300000190735, 0, 0, 257.74475097656);
            CreateDynamicObject(1298, 1297.5, 828.59997558594, 10.300000190735, 0, 0, 257.74475097656);
            CreateDynamicObject(1298, 1293.1999511719, 828.40002441406, 10.300000190735, 0, 0, 257.74475097656);
            CreateDynamicObject(1298, 1289.4000244141, 828.40002441406, 10.300000190735, 0, 0, 257.74475097656);
            CreateDynamicObject(1298, 1289.3994140625, 828.3994140625, 10.300000190735, 0, 0, 257.74475097656);
            CreateDynamicObject(1298, 1286.4000244141, 828.20001220703, 10.300000190735, 0, 0, 257.74475097656);
            CreateDynamicObject(1298, 1283.4000244141, 828, 10.300000190735, 0, 0, 257.74475097656);
            CreateDynamicObject(1298, 1279.5999755859, 828, 10.300000190735, 0, 0, 257.74475097656);
            CreateDynamicObject(1215, 1278.0999755859, 831.29998779297, 7.4000000953674, 0, 0, 0);
            CreateDynamicObject(1215, 1277.8000488281, 838.29998779297, 7.4000000953674, 0, 0, 0);
            CreateDynamicObject(1215, 1278.3000488281, 827.59997558594, 7.4000000953674, 0, 0, 0);
            CreateDynamicObject(3877, 1299.1999511719, 831.90002441406, 6.5999999046326, 0, 0, 0);
            CreateDynamicObject(3877, 1299.1999511719, 827.90002441406, 6.5999999046326, 0, 0, 0);
            CreateDynamicObject(3877, 1298.9000244141, 839.09997558594, 6.5999999046326, 0, 0, 0);
            return ( 1 );
    }

    public OnPlayerUpdate( playerid )
    {
            if( IsPlayerInRangeOfPoint( playerid, 15.0, 1288.0256,835.3664,7.9708 ) )
            {
                    if( IsPlayerInVehicle( playerid, 403 ) || IsPlayerInVehicle( playerid, 514 ) || IsPlayerInVehicle( playerid, 515 ) )
                    {
                            TogglePlayerControllable( playerid, true );
                            SendClientMessage( playerid, -1, "Please wait while we check your load" );
                            SetTimerEx( "TruckChecking", 3000, ( true ), "i", playerid );
                    }
                    return ( 1 );
            }
            return ( 1 );
    }

    Public:TruckChecking( playerid )
    {
            if( IsPlayerInRangeOfPoint( playerid, 15.0, 1288.0256,835.3664,7.9708 ) )
            {
                    TogglePlayerControllable( playerid, true );

                    switch( random( 2 ) )
                    {
                            case 0:
                            {
                                    SendClientMessage( playerid, -1, "Under the Limit Thankyou" );
                            }
                            case 1:
                            {
                                    GivePlayerMoney( playerid, - 2000 ); // 2500$ You can change it ;)
                                    SetPlayerWantedLevel( playerid, 2 ); // 2 - The Wanted Stars
                                    SendClientMessage( playerid, -1, "{ff0000}YOU ARE OVERLOADED 2 STARS AND A FINE" );
                            }
                    }
            }
            return ( 1 );
    }
Reply
#2

Why not just ask aRoach when he or she is about. Thats your best bet.
Reply
#3

i have asked but thought i would ask here aswel, you dont have to help . i was thinking of using a checkpoint aswel ?
Reply
#4

pawn Код:
if( IsPlayerInVehicle( playerid, 403 ) || IsPlayerInVehicle( playerid, 514 ) || IsPlayerInVehicle( playerid, 515 ) )
Wrong on so many points. Another classic case of vehicleid/modelid mix-up. https://sampwiki.blast.hk/wiki/GetVehicleModel
Not to mention that you will be spammed with that message and that the timer will be set tons of times.
Reply
#5

how to stop it spamming and the timer stuff because i got heavily spammed
Reply
#6

pawn Код:
SetTimerEx( "TruckChecking", 3000, ( true ), "i", playerid );
to

pawn Код:
SetTimerEx( "TruckChecking", 3000, ( false ), "i", playerid );
Reply
#7

will that stop the spam ?
Reply
#8

Yes,
  • True = repeating the timer.
  • False = Single time.
Reply
#9

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
Yes,
  • True = repeating the timer.
  • False = Single time.
No no, PWNED !

Is OnPlayerUpdate Dude... if he set False the timer will Start and Start and Start ....

Well dude i will give you in PM, 'aight?
Reply
#10

Quote:
Originally Posted by aRoach
Посмотреть сообщение
No no, PWNED !

Is OnPlayerUpdate Dude... if he set False the timer will Start and Start and Start ....

Well dude i will give you in PM, 'aight?
I don't know that. The only thing I know is that:
False = Not repeating.
True = Repeating.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)