Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define FILTERSCRIPT
- new BoothNDirNGate;
- new BoothNDirSGate;
- new BoothSDirSGate;
- new BoothSDirNGate;
- new BoothNDirNPickup;
- new BoothNDirSPickup;
- new BoothSDirSPickup;
- new BoothSDirNPickup;
- forward BoothNDirNGateClose();
- forward BoothNDirSGateClose();
- forward BoothSDirSGateClose();
- forward BoothSDirNGateClose();
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Gant Bridge Toll System by NtCat ");
- print("--------------------------------------\n");
- CreateObject(9623,-2681.730,2160.756,57.157,0.0,0.0,1.719); // Toolbooth-N
- CreateObject(987,-2690.029,2160.083,52.805,0.0,0.0,-180.000); // object (4)
- CreateObject(987,-2661.735,2162.129,52.731,0.0,0.0,-180.000); // object (5)
- CreateObject(966,-2673.953,2166.259,54.430,0.0,0.0,-360.000); // object (6)
- BoothNDirNGate = CreateObject(968,-2674.023,2166.251,55.283,0.0,-91.100,0.0); // BoothN-DirectionN-Gate-CLOSED
- BoothNDirNPickup = CreatePickup(1274,14,-2677.487,2163.541,55.974); // BoothN-DirectionN-Pickup
- CreateObject(966,-2689.839,2155.394,54.505,0.0,0.0,-180.000); // object (10)
- BoothNDirSGate = CreateObject(968,-2689.874,2155.389,55.365,0.0,-91.100,180.000); // BoothN-DirectionS-Gate-CLOSED
- BoothNDirSPickup = CreatePickup(1274,14,-2686.848,2157.813,55.549); // BoothN-DirectionS-Pickup
- CreateObject(987,-2689.829,1275.247,52.880,0.0,0.0,-180.000); // object (13)
- CreateObject(987,-2661.341,1274.936,52.837,0.0,0.0,-180.000); // object (14)
- CreateObject(966,-2682.812,1269.417,54.396,0.0,0.0,-360.000); // object (15)
- BoothSDirSGate = CreateObject(968,-2682.571,1269.406,55.255,0.0,-91.100,0.0); // BoothS-DirectionS-Gate-CLOSED
- BoothSDirSPickup = CreatePickup(1274,14,-2686.098,1272.244,55.924); // BoothS-DirectionS-Pickup
- CreateObject(966,-2680.916,1279.752,54.381,0.0,0.0,-540.000); // object (20)
- BoothSDirNGate = CreateObject(968,-2681.075,1279.747,55.208,0.0,-91.100,-180.000); // BoothS-DirectionN-Gate-CLOSED
- CreateObject(968,-2681.071,1279.759,55.215,0.0,-1.719,-180.000); // BoothS-DirectionN-Gate-OPEN
- BoothSDirNPickup = CreatePickup(1274,14,-2677.246,1277.456,55.499); // BoothS-DirectionN-Pickup
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == BoothNDirNPickup)
- {
- if(GetPlayerMoney(playerid) < 100) GameTextForPlayer(playerid,"~r~You need $100!",3000,4);
- else
- {
- SetObjectRot(BoothNDirNGate,0.0,0.0,0.0);
- SetTimer("BoothNDirNGateClose",7000,0);
- }
- }
- else if(pickupid == BoothNDirSPickup)
- {
- if(GetPlayerMoney(playerid) < 100) GameTextForPlayer(playerid,"~r~You need $100!",3000,4);
- else
- {
- GivePlayerMoney(playerid,-100);
- GameTextForPlayer(playerid,"~g~Toll paid, you may enter the bridge!",3000,4);
- SetObjectRot(BoothNDirSGate,0.0,-1.719,180.000);
- SetTimer("BoothNDirSGateClose",7000,0);
- }
- }
- else if(pickupid == BoothSDirSPickup)
- {
- if(GetPlayerMoney(playerid) < 100) GameTextForPlayer(playerid,"~r~You need $100!",3000,4);
- else
- {
- SetObjectRot(BoothSDirSGate,0.0,-2.578,0.0);
- SetTimer("BoothSDirSGateClose",7000,0);
- }
- }
- else if(pickupid == BoothSDirNPickup)
- {
- if(GetPlayerMoney(playerid) < 100) GameTextForPlayer(playerid,"~r~You need $100!",3000,4);
- else
- {
- GivePlayerMoney(playerid,-100);
- GameTextForPlayer(playerid,"~g~Toll paid, you may enter the bridge!",3000,4);
- SetObjectRot(BoothSDirNGate,0.0,-1.719,-180.000);
- SetTimer("BoothSDirNGateClose",7000,0);
- }
- }
- return 1;
- }
- public BoothNDirNGateClose() SetObjectRot(BoothNDirNGate,0.0,-91.100,0.0);
- public BoothNDirSGateClose() SetObjectRot(BoothNDirSGate,0.0,-91.100,180.000);
- public BoothSDirSGateClose() SetObjectRot(BoothSDirSGate,0.0,-91.100,0.0);
- public BoothSDirNGateClose() SetObjectRot(BoothSDirNGate,0.0,-91.100,-180.000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement