Skip to content

Commit

Permalink
Merge pull request #245 from Mrucznik/hotfixy
Browse files Browse the repository at this point in the history
Hotfixy
  • Loading branch information
Mrucznik authored Mar 26, 2020
2 parents 5b58150 + ada9764 commit 17fefb7
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 26 deletions.
4 changes: 2 additions & 2 deletions gamemodes/commands/cmd/wypisz.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ YCMD:wypisz(playerid, params[], help)
{
if(giveplayerid != INVALID_PLAYER_ID)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, sprintf("Da³eœ dowód osobisty %s", GetNick(giveplayerid, true)));
SendClientMessage(playerid, COLOR_LIGHTBLUE, sprintf("Da³eœ dowód osobisty %s", GetNickEx(giveplayerid)));
if(giveplayerid != playerid)
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, sprintf("Urzêdnik %s da³ Tobie dowód osobisty", GetNick(playerid, true)));
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, sprintf("Urzêdnik %s da³ Tobie dowód osobisty", GetNickEx(playerid)));

PlayerInfo[giveplayerid][pDowod] = 1;
return 1;
Expand Down
4 changes: 2 additions & 2 deletions gamemodes/commands/commands.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@
#include "cmd/wynajempomoc.pwn"
#include "cmd/wyniki.pwn"
#include "cmd/wypij.pwn"
//#include "cmd/wypisz.pwn"
#include "cmd/wypisz.pwn"
#include "cmd/wyplac.pwn"
#include "cmd/wyprowadz.pwn"
#include "cmd/wypusc.pwn"
Expand Down Expand Up @@ -1309,7 +1309,7 @@ static Aliases()
Command_AddAltNamed("wypij", "pij");

//wypisz
//Command_AddAltNamed("wypisz", "wydaj");
Command_AddAltNamed("wypisz", "wydaj");

//wyplac
Command_AddAltNamed("wyplac", "withdraw");
Expand Down
1 change: 1 addition & 0 deletions gamemodes/modules/cooking/commands/ugotuj/ugotuj_impl.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ ugotuj_OnDialogResponse(playerid, listitem)
SendClientMessage(playerid,COLOR_LIGHTBLUE, sprintf("* Ugotowa³es potrawê: %s, wa¿¹c¹ %dg.",
name, weight
));
command_ugotuj_Impl(playerid);
}

AddCookingFishRow(playerid, string[1024], slot, id, weight)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
//------------------<[ Implementacja: ]>-------------------
command_sprzedajrybe_Impl(playerid, fishid)
{
const moneyPerKg = 15;
new string[128];
if (!PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53))//centerpoint 24-7
{
Expand All @@ -41,6 +42,7 @@ command_sprzedajrybe_Impl(playerid, fishid)
KickEx(playerid);
return 1;
}

if(fishid < 1 || fishid > 5) { sendTipMessageEx(playerid, COLOR_GREY, "Numer ryby od 1 do 5 !"); return 1; }
else if(fishid == 1 && Fishes[playerid][pWeight1] < 1) { SendClientMessage(playerid, COLOR_GREY, " Nie z³owi³eœ ¿adnej ryby pod numerem(1) !"); return 1; }
else if(fishid == 2 && Fishes[playerid][pWeight2] < 1) { SendClientMessage(playerid, COLOR_GREY, " Nie z³owi³eœ ¿adnej ryby pod numerem(2) !"); return 1; }
Expand All @@ -50,9 +52,9 @@ command_sprzedajrybe_Impl(playerid, fishid)
else if(fishid == 1 && Fishes[playerid][pWeight1] >= 1)
{
SendClientMessage(playerid, COLOR_GREY, "Sprzeda³eœ rybê numer 1!");
format(string, sizeof(string), "Sprzeda³eœ rybê: %s, wa¿¹c¹ %d kg. Otrzymujesz %d$.", Fishes[playerid][pFish1], Fishes[playerid][pWeight1], Fishes[playerid][pWeight1]*20);
format(string, sizeof(string), "Sprzeda³eœ rybê: %s, wa¿¹c¹ %d kg. Otrzymujesz %d$.", Fishes[playerid][pFish1], Fishes[playerid][pWeight1], Fishes[playerid][pWeight1]*moneyPerKg);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
DajKase(playerid, Fishes[playerid][pWeight1]*25);
DajKase(playerid, Fishes[playerid][pWeight1]*moneyPerKg);
ClearFishID(playerid, fishid);
Fishes[playerid][pLastFish] = 0;
Fishes[playerid][pFishID] = 0;
Expand All @@ -61,9 +63,9 @@ command_sprzedajrybe_Impl(playerid, fishid)
else if(fishid == 2 && Fishes[playerid][pWeight2] >= 1)
{
SendClientMessage(playerid, COLOR_GREY, "Sprzeda³eœ rybê numer 2!");
format(string, sizeof(string), "Sprzeda³eœ rybê: %s, wa¿¹c¹ %d kg. Otrzymujesz %d$.", Fishes[playerid][pFish2], Fishes[playerid][pWeight2], Fishes[playerid][pWeight2]*20);
format(string, sizeof(string), "Sprzeda³eœ rybê: %s, wa¿¹c¹ %d kg. Otrzymujesz %d$.", Fishes[playerid][pFish2], Fishes[playerid][pWeight2], Fishes[playerid][pWeight2]*moneyPerKg);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
DajKase(playerid, Fishes[playerid][pWeight2]*25);
DajKase(playerid, Fishes[playerid][pWeight2]*moneyPerKg);
ClearFishID(playerid, fishid);
Fishes[playerid][pLastFish] = 0;
Fishes[playerid][pFishID] = 0;
Expand All @@ -72,9 +74,9 @@ command_sprzedajrybe_Impl(playerid, fishid)
else if(fishid == 3 && Fishes[playerid][pWeight3] >= 1)
{
SendClientMessage(playerid, COLOR_GREY, "Sprzeda³eœ rybê numer 3!");
format(string, sizeof(string), "Sprzeda³eœ rybê: %s, wa¿¹c¹ %d kg. Otrzymujesz %d$.", Fishes[playerid][pFish3], Fishes[playerid][pWeight3], Fishes[playerid][pWeight3]*20);
format(string, sizeof(string), "Sprzeda³eœ rybê: %s, wa¿¹c¹ %d kg. Otrzymujesz %d$.", Fishes[playerid][pFish3], Fishes[playerid][pWeight3], Fishes[playerid][pWeight3]*moneyPerKg);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
DajKase(playerid, Fishes[playerid][pWeight3]*25);
DajKase(playerid, Fishes[playerid][pWeight3]*moneyPerKg);
ClearFishID(playerid, fishid);
Fishes[playerid][pLastFish] = 0;
Fishes[playerid][pFishID] = 0;
Expand All @@ -83,9 +85,9 @@ command_sprzedajrybe_Impl(playerid, fishid)
else if(fishid == 4 && Fishes[playerid][pWeight4] >= 1)
{
SendClientMessage(playerid, COLOR_GREY, "Sprzeda³eœ rybê numer 4!");
format(string, sizeof(string), "Sprzeda³eœ rybê: %s, wa¿¹c¹ %d kg. Otrzymujesz %d$.", Fishes[playerid][pFish4], Fishes[playerid][pWeight4], Fishes[playerid][pWeight4]*20);
format(string, sizeof(string), "Sprzeda³eœ rybê: %s, wa¿¹c¹ %d kg. Otrzymujesz %d$.", Fishes[playerid][pFish4], Fishes[playerid][pWeight4], Fishes[playerid][pWeight4]*moneyPerKg);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
DajKase(playerid, Fishes[playerid][pWeight4]*25);
DajKase(playerid, Fishes[playerid][pWeight4]*moneyPerKg);
ClearFishID(playerid, fishid);
Fishes[playerid][pLastFish] = 0;
Fishes[playerid][pFishID] = 0;
Expand All @@ -94,9 +96,9 @@ command_sprzedajrybe_Impl(playerid, fishid)
else if(fishid == 5 && Fishes[playerid][pWeight5] >= 1)
{
SendClientMessage(playerid, COLOR_GREY, "Sprzeda³eœ rybê numer 5!");
format(string, sizeof(string), "Sprzeda³eœ rybê: %s, wa¿¹c¹ %d kg. Otrzymujesz %d$.", Fishes[playerid][pFish5], Fishes[playerid][pWeight5], Fishes[playerid][pWeight5]*20);
format(string, sizeof(string), "Sprzeda³eœ rybê: %s, wa¿¹c¹ %d kg. Otrzymujesz %d$.", Fishes[playerid][pFish5], Fishes[playerid][pWeight5], Fishes[playerid][pWeight5]*moneyPerKg);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
DajKase(playerid, Fishes[playerid][pWeight5]*25);
DajKase(playerid, Fishes[playerid][pWeight5]*moneyPerKg);
ClearFishID(playerid, fishid);
Fishes[playerid][pLastFish] = 0;
Fishes[playerid][pFishID] = 0;
Expand Down
2 changes: 1 addition & 1 deletion gamemodes/obiekty
7 changes: 1 addition & 6 deletions gamemodes/old_modules/niceczlowiek/general.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,12 @@ Player_CanUseCar(playerid, vehicleid)
{
if(CarData[lcarid][c_Owner] != GetPlayerFraction(playerid) && CarData[lcarid][c_Owner] != 11)
{
if(PlayerInfo[playerid][pAdmin] >= 5000) return 1;
format(string, sizeof(string), " Ten pojazd nale¿y do %s i nie mo¿esz nim kierowaæ.", FractionNames[CarData[lcarid][c_Owner]]);
sendTipMessageEx(playerid,COLOR_GREY,string);
return 0;
}
if(CarData[lcarid][c_Owner] == 11)
{
if(PlayerInfo[playerid][pAdmin] >= 5000) return 1;
if(GetPlayerFraction(playerid) == 11 && PlayerInfo[playerid][pRank] >= CarData[lcarid][c_Rang]) return 1;
if(GetPlayerFraction(playerid) == 11 && PlayerInfo[playerid][pRank] < CarData[lcarid][c_Rang])
{
Expand All @@ -198,7 +196,6 @@ Player_CanUseCar(playerid, vehicleid)
}
if(PlayerInfo[playerid][pRank] < CarData[lcarid][c_Rang])
{
if(PlayerInfo[playerid][pAdmin] >= 5000) return 1;
format(string, sizeof(string), "Aby kierowaæ tym pojazdem potrzebujesz %d rangi!", CarData[lcarid][c_Rang]);
sendTipMessageEx(playerid,COLOR_GREY,string);
return 0;
Expand Down Expand Up @@ -242,14 +239,12 @@ Player_CanUseCar(playerid, vehicleid)
}
if(wywal)
{
if(PlayerInfo[playerid][pAdmin] >= 5000) return 1;
format(string, sizeof(string), "Aby prowadziæ ten pojazd potrzebujesz %d skilla w zawodzie %s.", CarData[lcarid][c_Rang], JobNames[CarData[lcarid][c_Owner]]);
sendTipMessageEx(playerid,COLOR_GREY,string);
return 0;
}
if(vehicleid == 578 && PlayerInfo[playerid][pLevel] == 1)
if(GetVehicleModel(vehicleid) == 578 && PlayerInfo[playerid][pLevel] == 1)
{
if(PlayerInfo[playerid][pAdmin] >= 5000) return 1;
format(string, sizeof(string), "Musisz mieæ 2 level aby prowadziæ tym pojazdem.");
sendTipMessageEx(playerid,COLOR_GREY,string);
return 0;
Expand Down
3 changes: 1 addition & 2 deletions gamemodes/system/funkcje.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -8712,8 +8712,7 @@ Sejf_Load()

IsNickCorrect(nick[])
{
//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, "^[A-Z][a-z]+(( |_)[A-Z][a-z]{1,})+$") >= 0)
if(regex_match(nick, "^[A-Z][a-z]+([ _][A-Z][a-z]+([A-HJ-Z][a-z]+)?){1,2}$") >= 0)
{
return 1;
}
Expand Down
3 changes: 2 additions & 1 deletion gamemodes/system/timery.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,6 @@ public Production()
{
foreach(new i : Player)
{
if(PlayerInfo[i][pFishes] >= 5) { if(FishCount[i] >= 3) { PlayerInfo[i][pFishes] = 0; } else { FishCount[i] += 1; } }
if(PlayerDrunk[i] > 0) { PlayerDrunkTime[i] = 0; GameTextForPlayer(i, "~p~Jestes mniej pijany~n~~r~Pijaku", 3500, 1); }
if(GetPlayerDrunkLevel(i) < 1999 && PlayerDrunk[i] > 0) { PlayerDrunk[i] = 0; PlayerDrunkTime[i] = 0; GameTextForPlayer(i, "~p~Wytrzezwiales~n~~r~Pijaku", 3500, 1); }
if(PlayerInfo[i][pPayDay] < 6 && !IsPlayerPaused(i)) { PlayerInfo[i][pPayDay] += 1; } //+ 5 min to PayDay anti-abuse
Expand Down Expand Up @@ -2099,6 +2098,8 @@ public IdleKick()
PlayerPos[i][4] = PlayerPos[i][1];
PlayerPos[i][5] = PlayerPos[i][2];
}

if(PlayerInfo[i][pFishes] >= 5) { if(FishCount[i] >= 3) { PlayerInfo[i][pFishes] = 0; } else { FishCount[i] += 1; } }
}
return 1;
}/*
Expand Down
2 changes: 1 addition & 1 deletion include
1 change: 0 additions & 1 deletion pawn.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"Southclaws/pawn-requests:0.8.7",
"Open-GTO/sa-mp-fixes",
"emmet-jones/New-SA-MP-callbacks",
"NexiusTailer/Nex-AC",
"oscar-broman/strlib",
"pawn-lang/[email protected]",
"Southclaws/samp-whirlpool",
Expand Down

0 comments on commit 17fefb7

Please sign in to comment.