Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #include <a_samp>
- #include <YSI\y_iterate>
- #include <YSI\y_inline>
- #include <YSI\y_dialog>
- #include <YSI\y_commands>
- #include <YSI\y_timers>
- #define FILTERSCRIPT
- #define MAX_VEH_SPOTS (5)
- enum vehSpots {
- vsID, vsPrice,
- Float:vsMinX, Float:vsMinY,
- Float:vsMaxX, Float:vsMaxY
- }
- static
- getRektM8[MAX_VEH_SPOTS][vehSpots] = {
- {1, 500, -200.0, 50.0, 50.1, 50.0},
- {2, 200, -200.0, 50.0, 50.1, 50.0},
- {3, 300, -200.0, 50.0, 50.1, 50.0},
- {4, 400, -200.0, 50.0, 50.1, 50.0},
- {5, 700, -200.0, 50.0, 50.1, 50.0}
- };
- enum cw {
- cParkID, Float:cParkedX,
- Float:cParkedY, Float:cParkedZ,
- Float:cAngle
- }
- static
- cGetRektM8[MAX_VEHICLES][cw],
- Iterator:StreamedVehicles<MAX_VEHICLES>
- ;
- public OnFilterScriptInit()
- {
- print("Pati geriausia sistema paleista");
- for (new idx = 0; idx != MAX_VEH_SPOTS; idx++) {
- printf(" DEBUG with idx: %i for vsID: %i", idx, getRektM8[idx][vsID]);
- }
- Timer_StreamedVehicles();
- return 1;
- }
- YCMD:parkuot(playerid, params[], help) {
- #pragma unused params, help
- new
- vehicleID = GetPlayerVehicleID(playerid)
- ;
- if (vehicleID == INVALID_VEHICLE_ID)
- return SendClientMessage(playerid, -1, "Savo siknutes parkuot negali, nusipirk tacka");
- return (true);
- }
- task Timer_StreamedVehicles[2000]()
- {
- foreach(new veh : StreamedVehicles) {
- if (GetVehicleModel(veh) != 0) {
- if (cGetRektM8[veh][cParkID] != 0) {
- new
- Float:vehX,
- Float:vehY,
- Float:vehZ
- ;
- GetVehiclePos(veh, vehX, vehY, vehZ);
- if (cGetRektM8[veh][cParkedX] != vehX && cGetRektM8[veh][cParkedY] != vehY && cGetRektM8[veh][cParkedZ] != vehZ) {
- SendClientMessageToAll(-1, "OMG KAZKAS PAJUDINO TACKA SUPISKIT GALVA");
- SetVehiclePos(veh, cGetRektM8[veh][cParkedX], cGetRektM8[veh][cParkedY], cGetRektM8[veh][cParkedZ]);
- SetVehicleZAngle(veh, cGetRektM8[veh][cAngle]);
- continue;
- }
- }
- }
- }
- return (true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement