Shiny_

¯\_(ツ)_/¯

Jan 24th, 2021
940
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Includes:
  2.     #include <a_samp>
  3.     #include <crashdetect>
  4.     #include <mapandreas>
  5.     #include <regex>
  6.     #include <sscanf2>
  7.     #include <YSF>
  8.     #include <YSI\y_ini>
  9.     #include <YSI\y_iterate>
  10.     #include <zcmd>
  11.  
  12.     native WP_Hash(buffer[], len, const str[]);
  13.  
  14. // Macros:
  15.     #undef INI_String
  16.     #if defined _inc_sscanf && 0
  17.         #define INI_String(%1,%2,%3)                \
  18.                 if(!strcmp((%1), name, false) && !sscanf(value, "s["#%3"]", %2)) return;
  19.     #else
  20.         #define INI_String(%1,%2,%3)                \
  21.                 if(!strcmp((%1), name, false)) return strcpy(%2, value, %3)
  22.     #endif
  23.     #define function%0(%1)                          \
  24.             forward %0(%1);                         \
  25.             public %0(%1)
  26.     #define Timer::
  27.    
  28.     #if !defined INTERPOLATIONTIME
  29.             #define INTERPOLATIONTIME               \
  30.                     8000
  31.     #endif
  32.     #if !defined INI_WriteOneThing_INT
  33.         #define INI_WriteOneThing_INT(%0,%1,%2,%3)  \
  34.             new INI: %0;                            \
  35.             %0 = INI_Open(Path(playerid));          \
  36.             INI_SetTag(%0, %1);                     \
  37.             INI_WriteInt(%0, %2, %3);               \
  38.             INI_Close(%0)
  39.     #endif
  40.     #define PATH                                    \
  41.             "/Users/%s.ini"
  42.    
  43.     enum {
  44.         DIALOG_REG = 50,
  45.         DIALOG_LOGIN,
  46.         DIALOG_SUCC,
  47.     };
  48.    
  49.     enum pInfo {
  50.         pCash,
  51.         pAdmin,
  52.         pKills,
  53.         pDeaths,
  54.         pPass[129],
  55.     };
  56.    
  57. // Variables:
  58.     new vehicle;
  59.     new STR_[128];
  60.     new STR_2[128];
  61.     new text_[100];
  62.     new Float: Position[4];
  63.     new Name[MAX_PLAYER_NAME];
  64.     new RegEx: AntiAdvertisement;
  65.     new bool: IsPlayerLoggedIn[MAX_PLAYERS];
  66.     new bool: IsPlayerRegistered[MAX_PLAYERS];
  67.     new bool: Commanded[MAX_VEHICLES];
  68.     new PlayerInfo[MAX_PLAYERS][pInfo];
  69.     new Set_CameraPos_Timer[MAX_PLAYERS];
  70.     new PlayerText3D: Time3DText[MAX_PLAYERS];
  71.     new gVehicleNames[212][] = {
  72.         "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perennial", "Sentinel", "Dumper",
  73.         "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus", "Voodoo", "Pony", "Mule",
  74.         "Cheetah", "Ambulance", "Leviathan", "Moonbeam", "Esperanto", "Taxi", "Washington",
  75.         "Bobcat", "Mr Whoopee", "BF Injection", "Hunter", "Premier", "Enforcer", "Securicar",
  76.         "Banshee", "Predator", "Bus", "Rhino", "Barracks", "Hotknife", "Trailer 1", "Previon",
  77.         "Coach", "Cabbie", "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster",
  78.         "Admiral", "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer 2", "Turismo",
  79.         "Speeder", "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van",
  80.         "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale", "Oceanic",
  81.         "Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy", "Hermes", "Sabre",
  82.         "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX", "Burrito", "Camper", "Marquis",
  83.         "Baggage", "Dozer", "Maverick", "News Chopper", "Rancher", "FBI Rancher", "Virgo", "Greenwood",
  84.         "Jetmax", "Hotring", "Sandking", "Blista Compact", "Police Maverick", "Boxville", "Benson",
  85.         "Mesa", "RC Goblin", "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher",
  86.         "Super GT", "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropdust", "Stunt",
  87.         "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900",
  88.         "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune", "Cadrona", "FBI Truck",
  89.         "Willard", "Forklift", "Tractor", "Combine", "Feltzer", "Remington", "Slamvan",
  90.         "Blade", "Freight", "Streak", "Vortex", "Vincent", "Bullet", "Clover", "Sadler",
  91.         "Firetruck LA", "Hustler", "Intruder", "Primo", "Cargobob", "Tampa", "Sunrise", "Merit",
  92.         "Utility", "Nevada", "Yosemite", "Windsor", "Monster A", "Monster B", "Uranus", "Jester",
  93.         "Sultan", "Stratum", "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna",
  94.         "Bandito", "Freight Flat", "Streak Carriage", "Kart", "Mower", "Duneride", "Sweeper",
  95.         "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400", "Newsvan",
  96.         "Tug", "Trailer 3", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club", "Freight Carriage",
  97.         "Trailer 3", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car (LSPD)", "Police Car (SFPD)",
  98.         "Police Car (LVPD)", "Police Ranger", "Picador", "S.W.A.T. Van", "Alpha", "Phoenix", "Glendale",
  99.         "Sadler", "Luggage Trailer A", "Luggage Trailer B", "Stair Trailer", "Boxville", "Farm Plow",
  100.         "Utility Trailer"
  101.     };
  102.    
  103. // Static functions:
  104.     stock RespawnUnusedVehicles() {
  105.         new UsedVeh[MAX_VEHICLES] = {false, ...};
  106.         foreach(new playerid: Player) {
  107.             UsedVeh[GetPlayerVehicleID(playerid)] = true;
  108.         }
  109.        
  110.         for(new vehicleid = 1; vehicleid != MAX_VEHICLES; vehicleid++) {
  111.             if(UsedVeh[vehicleid]) continue;
  112.             if(Commanded[vehicleid]) {
  113.                 DestroyVehicle(vehicleid);
  114.                 Commanded[vehicleid] = false;
  115.             }
  116.             SetVehicleToRespawn(vehicleid);
  117.         }
  118.         return true;
  119.     }
  120.  
  121.     stock CreatePlayerVehicle(playerid, modelid) {
  122.         if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
  123.             vehicle = GetPlayerVehicleID(playerid);
  124.             GetVehiclePos(vehicle, Position[0], Position[1], Position[2]);
  125.             GetVehicleZAngle(vehicle, Position[3]);
  126.             DestroyVehicle(vehicle);
  127.         } else {
  128.             GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
  129.             GetPlayerFacingAngle(playerid, Position[3]);
  130.         }
  131.         vehicle = AddStaticVehicle(modelid, Position[0], Position[1], Position[2] + 1, Position[3], -1, -1);
  132.         LinkVehicleToInterior(vehicle, GetPlayerInterior(playerid));
  133.         SetVehicleVirtualWorld(vehicle, GetPlayerVirtualWorld(playerid));
  134.         SetVehicleNumberPlate(vehicle, PlayerName(playerid));
  135.         PutPlayerInVehicle(playerid, vehicle, 0);
  136.         Commanded[vehicle] = true;
  137.         return true;
  138.     }
  139.    
  140.     stock GetVehicleModelIDByName(vehiclename[]) {
  141.         for(new i = 0; i < 211; i++) {
  142.             if(strfind(gVehicleNames[i], vehiclename, true) != -1) return i + 400;
  143.         }
  144.         return -1;
  145.     }
  146.    
  147.     stock delete_free_space(string[], character = ' ') {
  148.         new len = strlen(string);
  149.         if(len) {
  150.             new begin = -1, end = len;
  151.             while(string[++begin] == character) {}
  152.             if(string[begin] == EOS) {
  153.                 string[0] = false;
  154.                 return true;
  155.             }
  156.             while(string[--end] == character) {}
  157.             strmid(string, string, begin, end + 1, len + 1);
  158.         }
  159.         return true;
  160.     }
  161.    
  162.     stock PlayerName(playerid) {
  163.         GetPlayerName(playerid, Name, sizeof(Name));
  164.         return Name;
  165.     }
  166.    
  167.     stock Path(playerid) {
  168.         new STR[128];
  169.         format(STR, sizeof(STR), PATH, PlayerName(playerid));
  170.         return STR;
  171.     }
  172.    
  173.     stock CheckLoginOrRegister(playerid) {
  174.         format(STR_, sizeof(STR_), "Witaj z powrotem %s.\nMasz już konto na tym serwerze, więc pozostaje Ci tylko wpisanie hasła w polu poniżej.", PlayerName(playerid));
  175.         format(STR_2, sizeof(STR_2), "Witaj %s.\nNie masz konta na tym serwerze, więc musisz wpisać hasło w polu poniżej aby kontynuować grę.", PlayerName(playerid));
  176.         switch(fexist(Path(playerid))) {
  177.             case 0: ShowPlayerDialog(playerid, DIALOG_REG, DIALOG_STYLE_PASSWORD, "Rejestracja", STR_2, "Zarejestruj", "Wyjdź");
  178.             case 1: {
  179.                 INI_ParseFile(Path(playerid), "Load_User_%s", .bExtra = true, .extra = playerid);
  180.                 ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logowanie", STR_, "Zaloguj", "Wyjdź");
  181.             }
  182.         }
  183.     }
  184.    
  185. // Dynamic functions:  
  186.     function RespawnVehicles(vehicleid) {
  187.         RespawnUnusedVehicles();
  188.         SendClientMessageToAll(-1, "Auta stworzone za pomocą komendy /v zostały usunięte!");
  189.         return true;
  190.     }
  191.    
  192.     function Time(playerid) {
  193.         new time[3];
  194.         new string__[128];
  195.         gettime(time[0], time[1], time[2]);
  196.         format(string__, sizeof(string__), "[%02d:%02d:%02d]", time[0], time[1], time[2]);
  197.         UpdatePlayer3DTextLabelText(playerid, Time3DText[playerid], -1, string__);
  198.         INI_WriteOneThing_INT(File_, "Dane Graczy", "Cash", GetPlayerMoney(playerid));
  199.         return true;
  200.     }
  201.    
  202.     function SetCameraPosEx(playerid) {
  203.         SetPlayerInterior(playerid, 0);
  204.         SetPlayerFacingAngle(playerid, 90.0);
  205.         SetPlayerPos(playerid, -1399.0179, 2640.7385, 55.6875);
  206.         SetPlayerCameraPos(playerid, -1410.462402, 2640.7385, 55.6875);
  207.         SetPlayerCameraLookAt(playerid, -1410.462402, 2640.7385, 55.6875, CAMERA_CUT);
  208.         ApplyAnimation(playerid, "RAPPING", "RAP_B_Loop", 4.0, 1, 0, 0, 0, 0);
  209.     }
  210.    
  211.     function Load_User_Data(playerid, name[], value[]) {
  212.         INI_Int("Cash", PlayerInfo[playerid][pCash]);
  213.         INI_Int("Admin", PlayerInfo[playerid][pAdmin]);
  214.         INI_Int("Kills", PlayerInfo[playerid][pKills]);
  215.         INI_Int("Deaths", PlayerInfo[playerid][pDeaths]);
  216.         INI_String("Password", PlayerInfo[playerid][pPass], 129);
  217.         return true;
  218.     }
  219.    
  220. // Public functions:
  221.     main() {
  222.         AntiAdvertisement = regex_build("\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)+([(/|,.)?\\s]{1,})+(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)+([(/|,.)?\\s]{1,})+(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)+([(/|,.)?\\s]{1,})+(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b");
  223.         printf(regex_isvalid(AntiAdvertisement)? ("Kod regex antyreklamy jest poprawny!"): ("Kod regex antyreklamy jest niepoprawny!"));
  224.         SetTimer("RespawnVehicles", 15 * 60 * 1000, true);
  225.         SetModeRestartTime(0.1);
  226.         return false;
  227.     }
  228.    
  229.     public OnPlayerConnect(playerid) {
  230.         PlayAudioStreamForPlayer(playerid, "http://alldev.eu/mp3/GTAV_Intro.mp3");
  231.        
  232.         InterpolateCameraPos(playerid, -2662.6853, 1933.7972, 225.7578, -1409.489868, 2642.814697, 58.506492, INTERPOLATIONTIME, CAMERA_MOVE);
  233.         InterpolateCameraLookAt(playerid, -2662.6853, 1933.7972, 225.7578, -1404.622924, 2642.720458, 57.364322, INTERPOLATIONTIME, CAMERA_MOVE);
  234.  
  235.         ApplyAnimation(playerid, "RAPPING", "RAP_B_Loop", 4.0, 1, 0, 0, 0, 0);
  236.         Set_CameraPos_Timer[playerid] = SetTimerEx("SetCameraPosEx", INTERPOLATIONTIME, false, "d", playerid);
  237.        
  238.         SetTimerEx("Time", 999, true, "d", playerid);
  239.         SendDeathMessage(INVALID_PLAYER_ID, playerid, 200);
  240.         CheckLoginOrRegister(playerid);
  241.         // SendClientMessage(playerid, -1, "W każdej chwili możesz zalogować się lub zarejestrować. Wystarczy, że wpiszesz /zaloguj bądź /zarejestruj.");
  242.         return true;
  243.     }
  244.    
  245.     public OnPlayerSpawn(playerid) {
  246.         if(strfind(PlayerName(playerid), "Cynka", true) != -1) {
  247.             SetPlayerSkin(playerid, 233);
  248.         }
  249.         KillTimer(Set_CameraPos_Timer[playerid]);
  250.         SetCameraBehindPlayer(playerid);
  251.         StopAudioStreamForPlayer(playerid);
  252.         SetPlayerFacingAngle(playerid, 90.0);
  253.         SetPlayerPos(playerid, -1399.0179, 2640.7385, 55.6875);
  254.         SetPlayerWorldBounds(playerid, 20000.0000, -20000.0000, 20000.0000, -20000.0000);
  255.         return true;
  256.     }
  257.    
  258.     public OnPlayerText(playerid, text[]) {
  259.         new MSG_EX[180];
  260.         new STRING[180];
  261.         format(MSG_EX, sizeof(MSG_EX), "%s próbuje reklamować.", PlayerName(playerid));
  262.         regex_replace_exid(text, AntiAdvertisement, MSG_EX, STRING);
  263.        
  264.         format(STRING, sizeof(STRING), "(ID: %d): %s", playerid, text);
  265.         SendPlayerMessageToAll(playerid, STRING);
  266.         printf("%s: %s", PlayerName(playerid), text);
  267.         return false;
  268.        
  269.         // Kolory:
  270.         // - zielony: #339933
  271.         // - pomarańczowy: #FF5917
  272.         // - bordowy: #BB0000
  273.     }
  274.    
  275.     public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
  276.         format(STR_, sizeof(STR_), "Witaj z powrotem %s.\nMasz już konto na tym serwerze, więc pozostaje Ci tylko wpisanie hasła w polu poniżej.", PlayerName(playerid));
  277.         format(STR_2, sizeof(STR_2), "Witaj %s.\nNie masz konta na tym serwerze, więc musisz wpisać hasło w polu poniżej aby kontynuować grę.", PlayerName(playerid));
  278.        
  279.         switch(dialogid) {
  280.             case DIALOG_REG: {
  281.                 switch(response) {
  282.                     case 0: Kick(playerid);
  283.                     case 1: {
  284.                         new HashPass[129];
  285.                         new INI: File_;
  286.                         WP_Hash(HashPass, sizeof(HashPass), inputtext);
  287.                         File_ = INI_Open(Path(playerid));
  288.                         INI_SetTag(File_, "Dane Graczy");
  289.                         INI_WriteInt(File_, "Cash", 0);
  290.                         INI_WriteInt(File_, "Admin", 0);
  291.                         INI_WriteInt(File_, "Kills", 0);
  292.                         INI_WriteInt(File_, "Deaths", 0);
  293.                         INI_WriteString(File_, "Password", HashPass);
  294.                         INI_Close(File_);
  295.                         if(!strlen(inputtext)) {
  296.                             return ShowPlayerDialog(playerid, DIALOG_REG, DIALOG_STYLE_PASSWORD, "Rejestracja", STR_2, "Zarejestruj", "Wyjdź");
  297.                         }
  298.                         SendClientMessage(playerid, -1, "Rejestracja przebiegła pomyślnie.");
  299.                     }
  300.                 }
  301.                 IsPlayerRegistered[playerid] = true;
  302.                 IsPlayerLoggedIn[playerid] = true;
  303.             }
  304.             case DIALOG_LOGIN: {
  305.                 switch(response) {
  306.                     case 0: Kick(playerid);
  307.                     case 1: {
  308.                         new HashPass[129];
  309.                         WP_Hash(HashPass, sizeof(HashPass), inputtext);
  310.                         if(!strcmp(HashPass, PlayerInfo[playerid][pPass], false)) {
  311.                             GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
  312.                             INI_ParseFile(Path(playerid), "Load_User_%s", .bExtra = true, .extra = playerid);
  313.                             SendClientMessage(playerid, -1, "Zalogowano poprawnie.");
  314.                         } else {
  315.                             return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logowanie", STR_, "Zaloguj", "Wyjdź");
  316.                         }
  317.                     }
  318.                 }
  319.                 IsPlayerRegistered[playerid] = true;
  320.                 IsPlayerLoggedIn[playerid] = true;
  321.             }
  322.         }
  323.         return true;
  324.     }
  325.    
  326.     public OnPlayerCommandPerformed(playerid, cmdtext[], success) {
  327.         if(!success) {
  328.             if(strlen(cmdtext) > 2) {
  329.                 strdel(cmdtext, 0, 1);
  330.                 for(new i = 400; i <= 611; i++) {
  331.                     if(strfind(gVehicleNames[i - 400], cmdtext, true) != -1) {
  332.                         CreatePlayerVehicle(playerid, i);
  333.                         format(text_, sizeof(text_), "Pojazd o nazwie {FF0000}%s{FFFFFF} zostaje utworzony.", gVehicleNames[i - 400]);
  334.                         SendClientMessage(playerid, -1, text_);
  335.                         return true;
  336.                     }
  337.                 }
  338.             }
  339.             format(text_, sizeof(text_), "Na serwerze nie ma takiej komendy jak /%s!", cmdtext);
  340.             SendClientMessage(playerid, -1, text_);
  341.             printf("%s wpisuje komendę: /%s", PlayerName(playerid), cmdtext);
  342.         }
  343.         return true;
  344.     }
  345.    
  346.     public OnPlayerStateChange(playerid, newstate, oldstate) {
  347.         format(text_, sizeof(text_), "%s", Time(playerid));
  348.         switch(newstate) {case PLAYER_STATE_DRIVER: Time3DText[playerid] = CreatePlayer3DTextLabel(playerid, text_, -1, 0, 0, 0, 15.0, INVALID_PLAYER_ID, GetPlayerVehicleID(playerid), 1);}
  349.         switch(oldstate) {case PLAYER_STATE_DRIVER: DeletePlayer3DTextLabel(playerid, Time3DText[playerid]);}
  350.         return true;
  351.     }
  352.    
  353.     public OnPlayerDeath(playerid, killerid, reason) {
  354.         SendDeathMessage(killerid, playerid, reason);
  355.         /*PlayerInfo[killerid][pKills]++;
  356.         PlayerInfo[playerid][pDeaths]++;*/
  357.         new INI: File_;
  358.         File_ = INI_Open(Path(playerid));
  359.         INI_SetTag(File_, "Dane Graczy");
  360.         if(killerid != INVALID_PLAYER_ID) {
  361.             INI_WriteInt(File_, "Kills", PlayerInfo[killerid][pKills]++);
  362.             SetPlayerScore(killerid, PlayerInfo[killerid][pKills]);
  363.             PlayerInfo[killerid][pCash] += 100;
  364.             GivePlayerMoney(killerid, 100);
  365.         }
  366.         INI_WriteInt(File_, "Deaths", PlayerInfo[playerid][pDeaths]++);
  367.         INI_Close(File_);
  368.         PlayerInfo[playerid][pCash] -= 100;
  369.         GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
  370.         SetPlayerAmmo(playerid, 223, 0);
  371.         return true;
  372.     }
  373.  
  374.     public OnPlayerDisconnect(playerid, reason) {
  375.         // new INI: File_;
  376.         // File_ = INI_Open(Path(playerid));
  377.         if(!IsPlayerConnected(playerid)) {
  378.             DeletePlayer3DTextLabel(playerid, Time3DText[playerid]), KillTimer(Set_CameraPos_Timer[playerid]);
  379.             // INI_SetTag(File_, "Dane Graczy");
  380.             // INI_WriteInt(File_, "Cash", GetPlayerMoney(playerid));
  381.             // INI_Close(File_);
  382.         }
  383.         // else {
  384.             // INI_WriteOneThing_INT(File_, "Dane Graczy", "Cash", GetPlayerMoney(playerid));
  385.         // }
  386.         // IsPlayerLoggedIn[playerid] = false;
  387.         // IsPlayerRegistered[playerid] = false;
  388.         SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
  389.         return true;
  390.     }
  391.    
  392.     public OnGameModeExit() {
  393.         return regex_delete(AntiAdvertisement) && true;
  394.     }
  395.    
  396. // Commands:
  397.     // CMD:zaloguj(playerid) {
  398.         // if(IsPlayerLoggedIn[playerid] == true) {
  399.             // return SendClientMessage(playerid, -1, "Komenda /zaloguj została już przez Ciebie wpisana. Chcesz zalogować się jeszcze raz?");
  400.         // }
  401.         // CheckLoginOrRegister(playerid);
  402.         // return true;
  403.     // }
  404.    
  405.     // CMD:zarejestruj(playerid) {
  406.         // if(IsPlayerRegistered[playerid] == true) {
  407.             // return SendClientMessage(playerid, -1, "Komenda /zarejestruj została już przez Ciebie wpisana. Chcesz zarejestrować się jeszcze raz?");
  408.         // }
  409.         // CheckLoginOrRegister(playerid);
  410.         // return true;
  411.     // }
  412.    
  413.     CMD:v(playerid, params[]) {
  414.         new GetVehicleModelVariable;
  415.         GetVehicleModelVariable = GetVehicleModelIDByName(params);
  416.         delete_free_space(params);
  417.         if(isnull(params)) return SendClientMessage(playerid, -1, "Wpisz /v nazwa_pojazdu");
  418.         else if(GetVehicleModelVariable != -1) CreatePlayerVehicle(playerid, GetVehicleModelVariable), format(text_, sizeof(text_), "Pojazd o nazwie {FF0000}%s{FFFFFF} zostaje utworzony.", gVehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid)) - 400]), SendClientMessage(playerid, -1, text_);
  419.         else SendClientMessage(playerid, -1, "Zła nazwa pojazdu!");
  420.         return true;
  421.     }
  422.    
  423.     CMD:respawn(playerid) {
  424.         if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Tą komendę może wpisać tylko Administrator!");
  425.         // else if(strfind(PlayerName(playerid), "Shiny", true) != -1) {
  426.         RespawnUnusedVehicles();
  427.         // }
  428.         return true;
  429.     }
  430.    
  431.     CMD:flip(playerid) {
  432.         new Float: x, Float: y, Float: z, Float: Angle;
  433.         if(IsPlayerInAnyVehicle(playerid)) {
  434.             GetPlayerPos(playerid, x, y, z);
  435.             GetVehicleZAngle(GetPlayerVehicleID(playerid), Angle);
  436.             SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z + 1);
  437.             SetVehicleZAngle(GetPlayerVehicleID(playerid), Angle);
  438.         }
  439.         return true;
  440.     }
RAW Paste Data