Skip to content

Commit

Permalink
Merge branch 'v2.7.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrucznik committed Feb 11, 2024
2 parents 9149d52 + a4bc2d9 commit ed66262
Show file tree
Hide file tree
Showing 80 changed files with 1,415 additions and 430 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
url = https://github.com/Mrucznik/Mrucznik-RP-Includes.git
[submodule "models"]
path = models
url = git@github.com:Mrucznik/Mrucznik-RP-models
url = https://github.com/Mrucznik/Mrucznik-RP-models.git
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ RUN apt-get install wget gcc-10-base:i386 libc6:i386 libcrypt1:i386 libgcc-s1:i3
RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.0.0_1.0.2g-1ubuntu4.20_i386.deb
RUN dpkg -i libssl1.0.0_1.0.2g-1ubuntu4.20_i386.deb

# build gm
RUN sampctl package ensure
RUN sampctl package build

# copy files
RUN tar -xvf serverfiles.tar.gz
RUN cp -r gamemodes/*.amx serverfiles/gamemodes/
Expand All @@ -30,5 +26,6 @@ WORKDIR /samp/serverfiles
ENTRYPOINT ["/samp/serverfiles/samp-svr"]

WORKDIR /samp
ENTRYPOINT ["stampctl"]
CMD ["package", "build"]
RUN sampctl package ensure
ENTRYPOINT ["sampctl"]
CMD ["package", "run"]
3 changes: 2 additions & 1 deletion db/mrp_samp.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2667,7 +2667,8 @@ CREATE TABLE `mru_ryby` (
`Fid2` int(11) NOT NULL DEFAULT 0,
`Fid3` int(11) NOT NULL DEFAULT 0,
`Fid4` int(11) NOT NULL DEFAULT 0,
`Fid5` int(11) NOT NULL DEFAULT 0
`Fid5` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`Player`)
) ENGINE=InnoDB DEFAULT CHARSET=cp1250 COLLATE=cp1250_bin;

-- --------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

scp -P 2255 gamemodes/Mrucznik-RP.amx [email protected]:/home/samp/samp/gamemodes/Mrucznik-RP.amx
scp -P 2255 gamemodes/Mrucznik-RP.amx [email protected]:/home/minecraft/samp/mrp-serverfiles/gamemodes/Mrucznik-RP.amx
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ version: "3"

services:
samp:
image: mrucznik/mrucznik-rp:v2.6
image: mrucznik/mrucznik-rp:v2.7
build: .
privileged: true
# If you want to change server configuration, extract serverfiles:
# tar -xvf serverfiles.tar.gz serverfiles
# and uncomment this lines:
volumes:
# - ./serverfiles/scriptfiles:/samp/serverfilesscriptfiles
# - ./serverfiles/scriptfiles:/samp/serverfiles/scriptfiles
- ./serverfiles/logs:/samp/serverfiles/logs
# - ./serverfiles/server.cfg:/samp/serverfiles/server.cfg
expose:
Expand All @@ -22,7 +22,7 @@ services:
- mysqld

mysqld:
image: mysql:5.7
image: mysql:8.0
volumes:
- ./db:/docker-entrypoint-initdb.d
environment:
Expand Down
30 changes: 23 additions & 7 deletions gamemodes/Mrucznik-RP.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Mrucznik
//const correctness off - how to fix: https://github.com/pawn-lang/YSI-Includes/commit/ab75ea38987e6a7935aa3100eba5284cb3d706e1
#pragma warning disable 239
#pragma warning disable 214
#pragma warning disable 213 // disable required bool: prefix for booleans

//-------------------------------------------<[ Biblioteki ]>------------------------------------------------//
//- -//
Expand All @@ -65,7 +66,6 @@ Mrucznik
// actors https://github.com/Dayrion/actor_plus
// #include <PawnPlus>
// #include <requests>
// #include <colandreas>

//-------<[ Include ]>-------
#include <a_http>
Expand All @@ -85,7 +85,11 @@ Mrucznik
#include <indirection>
#include <amx_assembly\addressof>
//redefinition from y_playerarray.inc
#undef PlayerArray
#undef PlayerArray

#include <colandreas>
#include <colandreas_streamer_integrate>

#include <sort-inline>
//nex-ac settings
#define AC_MAX_CONNECTS_FROM_IP 3
Expand All @@ -95,9 +99,10 @@ Mrucznik
#define AC_USE_AMMUNATIONS false
#define AC_USE_RESTAURANTS false
#define AC_USE_CASINOS false
#include <progress2>
#include <Pawn.RakNet>
#include <nex-ac>
#include <md5>
#include <progress2>
#include <double-o-files2>
#include <dialogs>
#include <fadescreen>
Expand All @@ -110,6 +115,16 @@ Mrucznik
#include <mapfix>
#include <getvehiclerotationquat_fix>

#if defined _colandreas_included
#include "obiekty\colandreas_removebuildings.pwn"
hook OnGameModeInit()
{
printf("ColAndreas - usuwanie budynków i inicjalizacja mapy.");
ColAndreas_UsunBudynki();
CA_Init();
}
#endif

//--------------------------------------<[ G³ówne ustawienia ]>----------------------------------------------//
//- -//
#include "VERSION.pwn"
Expand Down Expand Up @@ -267,7 +282,7 @@ public OnGameModeInit()
//-------<[ MySQL ]>-------
MruMySQL_Connect();//mysql
MruMySQL_IloscLiderowLoad();


DefaultItems_LicenseCost();

Expand Down Expand Up @@ -862,7 +877,7 @@ public OnPlayerEnterDynamicArea(playerid, areaid)
if(kolid != -1 && OilData[kolid][oilHP] > 0)
{
OnPlayerEnterOilSpot(playerid);
return;
return 1;
}
kolid = -1;
for(new i=0;i<MAX_KOLCZATEK;i++)
Expand All @@ -876,9 +891,10 @@ public OnPlayerEnterDynamicArea(playerid, areaid)
if(kolid != -1)
{
OnPlayerEnterSpikes(playerid);
return;
return 1;
}
}
return 1;
}

public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
Expand Down Expand Up @@ -1052,7 +1068,7 @@ public OnPlayerConnect(playerid)
KickEx(playerid);
return 1;
}*/
if(regex_match(nick, "^[A-Z]{1}[a-z]{1,}(_[A-Z]{1}[a-z]{1,}([A-HJ-Z]{1}[a-z]{1,})?){1,2}$") <= 0)
if(regex_match(nick, "^(Le)?[A-Z]{1}[a-z]{1,}(_[A-Z]{1}[a-z]{1,}([A-HJ-Z]{1}[a-z]{1,})?){1,2}$") <= 0)
{
SendClientMessage(playerid, COLOR_NEWS, "SERWER: Twój nick jest niepoprawny! Nick musi posiadaæ formê: Imiê_Nazwisko!");
KickEx(playerid);
Expand Down
2 changes: 1 addition & 1 deletion gamemodes/VERSION.pwn
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define VERSION "v2.7.10"
#define VERSION "v2.7.11"
4 changes: 2 additions & 2 deletions gamemodes/commands/cmd/ah.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ YCMD:ah(playerid, params[], help)
SendClientMessage(playerid, COLOR_GRAD1, "* SKRYPTER *** /mark /gotomark /gotocar /getcar /getposp");
SendClientMessage(playerid, COLOR_GRAD1, "* SKRYPTER *** /gotols /gotoszpital /gotolv /gotosf /gotoin /gotostad /gotojet");
SendClientMessage(playerid, COLOR_GRAD1, "* SKRYPTER *** /gotomechy /gotobank /gotostacja /checktank");
SendClientMessage(playerid, COLOR_GRAD1, "* SKRYPTER *** /unbp /dajdowozu /specshow /setdrunk");
SendClientMessage(playerid, COLOR_GRAD1, "* SKRYPTER *** /unbp /dajdowozu /specshow /setdrunk /aulecz");
}
if (PlayerInfo[playerid][pAdmin] >= 1)
{
Expand Down Expand Up @@ -95,7 +95,7 @@ YCMD:ah(playerid, params[], help)
}
if (PlayerInfo[playerid][pAdmin] >= 20)
{
SendClientMessage(playerid, COLOR_GRAD4,"*20* ADMIN *** /noooc /demorgan /jail /gotoint");
SendClientMessage(playerid, COLOR_GRAD4,"*20* ADMIN *** /noooc /demorgan /jail /gotoint /aulecz");
}
if (PlayerInfo[playerid][pAdmin] >= 25)
{
Expand Down
11 changes: 8 additions & 3 deletions gamemodes/commands/cmd/aresztuj.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ YCMD:aresztuj(playerid, params[], help)
|| PlayerToPoint(10.0, playerid, -2614.1667,2264.6279,8.2109 ) //bayside
|| PlayerToPoint(5, playerid, 1560.0333,-1638.6797,28.4881)//nowe komi 1
|| PlayerToPoint(5, playerid, 1559.8517,-1646.9373,28.4881)//nowe komi 2
|| PlayerToPoint(20.0,playerid,NG_JAIL_X, NG_JAIL_Y, NG_JAIL_Z)) // stanowe
|| PlayerToPoint(20.0,playerid,NG_JAIL_X, NG_JAIL_Y, NG_JAIL_Z) // stanowe
|| PlayerToPoint(20.0,playerid,599.1960,-1489.5380,82.1648)) // areszt fbi
{

new playa;
Expand Down Expand Up @@ -81,7 +82,9 @@ YCMD:aresztuj(playerid, params[], help)
PoziomPoszukiwania[playa] = 0;
SetPlayerWantedLevel(playa, 0);
DajKase(playerid, depo3);
Sejf_Add(PlayerInfo[playerid][pMember], depo2);
new sejf = PlayerInfo[playerid][pMember] ? PlayerInfo[playerid][pMember] : PlayerInfo[playerid][pLider];
if(sejf)
Sejf_Add(sejf, depo2);
format(string, sizeof(string), "Uwiêzi³eœ %s, nagroda za przestêpcê: %d. Otrzymujesz $%d", giveplayer, price, depo3);
// format(string, sizeof(string), "* Uwiêzi³eœ %s w Wiêzieniu, nagroda za przestêpcê: %d", giveplayer, price);
//DajKase(playerid, price);
Expand Down Expand Up @@ -125,7 +128,9 @@ YCMD:aresztuj(playerid, params[], help)
}
else if(PoziomPoszukiwania[playa] >= 6) //wsadzanie do stanowca
{
if(!PlayerToPoint(20.0,playerid,NG_JAIL_X, NG_JAIL_Y, NG_JAIL_Z))
new Float:z;
GetPlayerPos(playerid, z, z, z); // zeby nie wsadzali z recepcji
if(!PlayerToPoint(20.0,playerid,NG_JAIL_X, NG_JAIL_Y, NG_JAIL_Z) && !(PlayerToPoint(20.0,playerid,599.1960,-1489.5380,82.1648) && z < 84))
{
sendTipMessageEx(playerid, COLOR_GRAD3, "Ten gracz ma za du¿y WL alby wsadziæ go do zwyk³ej celi. WsadŸcie go do stanowego.");
}
Expand Down
10 changes: 7 additions & 3 deletions gamemodes/commands/cmd/fbidrzwi.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,24 @@ YCMD:fbidrzwi(playerid, params[], help)
{
if(IsPlayerConnected(playerid))
{
if(GetPlayerFraction(playerid) == FRAC_FBI)
if(GetPlayerFraction(playerid) == FRAC_FBI && PlayerInfo[playerid][pRank] >= 3)
{
if(doorFBIStatus == 0)
{
doorFBIStatus = 1;
sendTipMessage(playerid, "Otworzy³eœ biurowiec FBI");
sendTipMessage(playerid, "Otworzy³eœ biurowiec FBI.");
}
else
{
doorFBIStatus = 0;
sendTipMessage(playerid, "Zamykasz biurowiec FBI");
sendTipMessage(playerid, "Zamykasz biurowiec FBI dla ka¿dego prócz FBI.");
}

}
else
{
sendTipMessage(playerid, "Ta komenda jest dostêpna od rangi [3]");
}
}
return 1;
}
4 changes: 2 additions & 2 deletions gamemodes/commands/cmd/liderpomoc.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@

YCMD:liderpomoc(playerid, params[], help)
{
if (PlayerInfo[playerid][pLider] >= 1)
if (PlayerInfo[playerid][pLider] >= 1 || orgIsLeader(playerid))
{
ShowPlayerDialogEx(playerid, DIALOG_LIDER01, DIALOG_STYLE_MSGBOX, "Komendy Lidera", "/przyjmij - Przyjmujesz danego gracza do swojej - rodziny/frakcji\n/zwolnij - Wyrzucasz danego gracza ze swojej - rodziny/frakcji\n/dajrange - Wystawiasz danemu graczowi range (1-6)\n/awans - Dajesz członkowi frakcji/rodziny awans\n/degraduj - Degradujesz członka z danej rangi na niższš.\n/pracownicy - Pokazuje liste pracowników online", "Zamknij", "");
ShowPlayerDialogEx(playerid, DIALOG_LIDER01, DIALOG_STYLE_MSGBOX, "Komendy Lidera", "/przyjmij - Przyjmujesz danego gracza do swojej - rodziny/frakcji\n/zwolnij - Wyrzucasz danego gracza ze swojej - rodziny/frakcji\n/dajrange - Wystawiasz danemu graczowi range (1-6)\n/awans - Dajesz członkowi frakcji/rodziny awans\n/degraduj - Degradujesz członka z danej rangi na niższš.\n/pracownicy - Pokazuje liste pracowników online\n/lidercar - zarzšdzanie pojazdami organizacji.\n/liderranga - Zmiana nazw rang.", "Zamknij", "");
if(PlayerInfo[playerid][pLider] == 11)
{
ShowPlayerDialogEx(playerid, DIALOG_LIDER02, DIALOG_STYLE_MSGBOX, "Komendy Lidera", "/podatek(/dajpodatek) - dajesz pieniadze policjantom", "Zamknij", "");
Expand Down
2 changes: 1 addition & 1 deletion gamemodes/commands/cmd/paka.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ YCMD:paka(playerid, params[], help)

if(IsPlayerConnected(playerid))
{
if(IsAPolicja(playerid) && PlayerInfo[playerid][pRank] >= 3)
if(IsAPolicja(playerid) && PlayerInfo[playerid][pRank] >= 2)
{
if(OnDuty[playerid] != 1 && IsAPolicja(playerid))
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//-----------------------------------------------<< MySQL >>-------------------------------------------------//
// admin //
//-----------------------------------------------<< Komenda >>-----------------------------------------------//
//-----------------------------------------------[ paralizator ]---------------------------------------------//
//----------------------------------------------------*------------------------------------------------------//
//----[ ]----//
//----[ ||||| ||||| |||||||||| |||||||||| ]----//
Expand All @@ -16,15 +16,33 @@
//----[ ||| ||||| ||| ||| ||| ||| ]----//
//----[ ]----//
//----------------------------------------------------*------------------------------------------------------//
// Autor: 2.5
// Data utworzenia: 04.05.2019
//Opis:

// Opis:
/*
System administracji.
*/

//

//------------------<[ MySQL: ]>--------------------
// Notatki skryptera:
/*
Szybkie wyci¹gniêcie paralizatora.
*/

//end
YCMD:paralizator(playerid, params[], help)
{
if(gPlayerLogged[playerid] == 1 && IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pInjury] > 0 || PlayerInfo[playerid][pBW] > 0) return 1;
new playerState = GetPlayerState(playerid);
if(playerState == 1)
{
new weaponid = 0, ammo = 0;
GetPlayerWeaponData(playerid, 2, weaponid, ammo);
if(ammo > 0 && weaponid == 24 && (IsAPolicja(playerid) || IsABOR(playerid)) && (OnDuty[playerid] == 1 || OnDutyCD[playerid] == 1))
{
PrzedmiotyZmienBron(playerid, 24, 1);
}
}
}
return 1;
}
2 changes: 1 addition & 1 deletion gamemodes/commands/cmd/pomoc2.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ YCMD:pomoc2(playerid, params[], help)
}
if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLider] == 2)
{
SendClientMessage(playerid, COLOR_GRAD5, "*** FBI *** /zmienskin /namierz /(fed)eralne");
SendClientMessage(playerid, COLOR_GRAD5, "*** FBI *** /zmienskin /namierz /(fed)eralne /fbidrzwi");
}
if (PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLider] == 17)
{
Expand Down
3 changes: 3 additions & 0 deletions gamemodes/commands/cmd/pr.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ YCMD:pr(playerid, params[], help)
}
mysql_real_escape_string(name, name);
if(orgSetName(org, name)) sendTipMessageEx(playerid, COLOR_WHITE, "Zmieni³eœ nazwê swojej rodziny.");
orgSave(org, ORG_SAVE_TYPE_DESC);
}
else if(strcmp(x_nr,"motd",true) == 0)
{
Expand All @@ -71,6 +72,7 @@ YCMD:pr(playerid, params[], help)
}
mysql_real_escape_string(lStr, lStr);
if(orgSetMotd(org, lStr)) sendTipMessageEx(playerid, COLOR_WHITE, "Zmieni³eœ MOTD rodziny.");
orgSave(org, ORG_SAVE_TYPE_DESC);
}
else if(strcmp(x_nr,"color",true) == 0 || strcmp(x_nr,"kolor",true) == 0)
{
Expand All @@ -88,6 +90,7 @@ YCMD:pr(playerid, params[], help)
hexa = (hexa << 8);
OrgInfo[org][o_Color] = hexa;
sendTipMessageEx(playerid, hexa, "Zmieni³eœ kolor rodziny.");
orgSave(org, ORG_SAVE_TYPE_BASIC);
}
else if(strcmp(x_nr,"spawn",true) == 0)
{
Expand Down
2 changes: 1 addition & 1 deletion gamemodes/commands/cmd/rozwiaz.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ YCMD:rozwiaz(playerid, params[], help)

if(IsPlayerConnected(playerid))
{
if(IsAPrzestepca(playerid))
if(IsAPrzestepca(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
{
if(PlayerInfo[playerid][pRank] < 2 && !PlayerInfo[playerid][pAdmin] >= 1)
{
Expand Down
Loading

0 comments on commit ed66262

Please sign in to comment.