Skip to content

Commit

Permalink
Merge pull request #247 from Mrucznik/hotfixy
Browse files Browse the repository at this point in the history
Aktualizacja 2.7.2
  • Loading branch information
Mrucznik authored Mar 31, 2020
2 parents 6461d2a + f04542e commit debfcd8
Show file tree
Hide file tree
Showing 38 changed files with 175 additions and 218 deletions.
82 changes: 45 additions & 37 deletions gamemodes/Mrucznik-RP.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,18 @@ public OnGameModeInit()
FabrykaMats_LoadLogic();
NowaWybieralka_Init();
LoadBusiness();
LoadBusinessPickup();
//LoadActors();
LoadBusinessPickup();
//-------<[ actors ]>-------
PushActors();
LoadActors();
LoadConfig();

//Config
LoadConfig();

//Old Groups - to remove \/
WczytajRangi();
WczytajSkiny();

//Konfiguracja ID skryptu dla rodzin - daj -1 w bazie aby wy³¹czyæ korzystanie ze skryptu dla slotu
Config_FamilyScript();
//
Expand Down Expand Up @@ -1307,14 +1311,6 @@ public OnPlayerDisconnect(playerid, reason)
KillTimer(saveMyAccountTimer[playerid]);
}

//PADZIOCH - lina SWAT
if(GetPVarInt(playerid,"roped") == 1)
{
for(new i=0;i<ROPELENGTH;i++)
{
DestroyDynamicObject(r0pes[playerid][i]);
}
}
//budki telefoniczne
if(GetPVarInt(playerid, "budka-Mobile") != 999) {
new caller = GetPVarInt(playerid, "budka-Mobile");
Expand Down Expand Up @@ -1860,10 +1856,6 @@ public OnPlayerDeath(playerid, killerid, reason)
}
if(GetPVarInt(playerid,"roped") == 1)
{
for(new i=0;i<ROPELENGTH;i++)
{
DestroyDynamicObject(r0pes[playerid][i]);
}
ClearAnimations(playerid);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
SetPVarInt(playerid,"roped",0);
Expand Down Expand Up @@ -5097,7 +5089,7 @@ public OnPlayerStateChange(playerid, newstate, oldstate)
SetPlayerPos(playerid, slx, sly, slz+0.2);
ClearAnimations(playerid);
}
if(IsACopCar(GetPlayerVehicleID(playerid))) sendTipMessageEx(playerid, COLOR_BLUE, "Po³¹czy³eœ siê z komputerem policyjnym, wpisz /mdc aby zobaczyæ kartotekê policyjn¹");
if(IsACopCar(GetPlayerVehicleID(playerid)) && IsAPolicja(playerid)) sendTipMessageEx(playerid, COLOR_BLUE, "Po³¹czy³eœ siê z komputerem policyjnym, wpisz /mdc aby zobaczyæ kartotekê policyjn¹");
if(newstate == PLAYER_STATE_DRIVER) TJD_CallEnterVeh(playerid, GetPlayerVehicleID(playerid));
}
else if(oldstate == PLAYER_STATE_DRIVER)
Expand Down Expand Up @@ -5582,7 +5574,7 @@ PayDay()
SendRconCommand("reloadlog");
SendRconCommand("reloadbans");

if(DmvActorStatus && shifthour < 16 || shifthour > 22)
if(DmvActorStatus && (shifthour < 16 || shifthour > 22))
{
DestroyActorsInDMV(INVALID_PLAYER_ID);
}
Expand Down Expand Up @@ -5771,6 +5763,31 @@ public OnPlayerUpdate(playerid)
GetPlayerKeys(playerid, keys, ud, lr);
if(ud == KEY_DOWN) CruiseControl_SetSpeed(playerid, 10, false);
else if(ud == KEY_UP) CruiseControl_SetSpeed(playerid, 10, true);
return 1;
}
if(Spectate[playerid] != INVALID_PLAYER_ID)
{
new keys, ud,lr, actualid = INVALID_PLAYER_ID;
GetPlayerKeys(playerid, keys, ud, lr);
if(lr == KEY_RIGHT) //NEXT
{
foreach(new i : Player)
{
if(i == playerid) continue;
if(actualid != INVALID_PLAYER_ID) //if is set
{
new str[6];
valstr(str, i);
RunCommand(playerid, "/spec", str);
break;
}
else if(i == Spectate[playerid]) //if not set and expect
{
actualid = i;
}
}
}
return 1;
}
return 1;
}
Expand Down Expand Up @@ -5914,7 +5931,7 @@ OnPlayerLogin(playerid, password[])
//£adowanie konta i zmiennych:
//----------------------------

if( !MruMySQL_LoadAcocount(playerid) )
if( !MruMySQL_LoadAccount(playerid) )
{
SendClientMessage(playerid, COLOR_WHITE, "[SERVER] {FF0000}Krytyczny b³¹d konta. Zg³oœ zaistnia³¹ sytuacjê na forum.");
Log(serverLog, ERROR, "Krytyczny b³¹d konta %s (pusty rekord?)", nick);
Expand Down Expand Up @@ -6228,7 +6245,6 @@ public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
}
}

//11.06.2014
if(PRESSED(KEY_JUMP) && Spectate[playerid] != INVALID_PLAYER_ID)
{
PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
Expand Down Expand Up @@ -6578,10 +6594,6 @@ public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
ClearAnimations(playerid);
SetPVarInt(playerid,"roped", 0);
SetPVarInt(playerid,"chop_id",0);
for(new i=0;i<ROPELENGTH;i++)
{
DestroyDynamicObject(r0pes[playerid][i]);
}
}
}
if(PRESSED(KEY_FIRE))
Expand Down Expand Up @@ -6678,10 +6690,6 @@ public OnVehicleDeath(vehicleid, killerid)
SetPVarInt(i,"roped",0);
ClearAnimations(i);
TogglePlayerControllable(i,1);
for(new j=0;j<ROPELENGTH;j++)
{
DestroyDynamicObject(r0pes[i][j]);
}
}
}
}
Expand Down Expand Up @@ -6943,15 +6951,14 @@ public OnPlayerText(playerid, text[])
}//lets start
if(strcmp(x_nr,"1",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, "Ten numer jest zajêty, usuñ wiadomoœæ z tego numeru !"); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, "Musisz miec 3 rangê aby pisaæ newsy Hitman Agency !"); return 0; }
if(News[hTaken1] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, "Za krótki tekst newsa !"); return 0; }
format(string, sizeof(string), "%s",rightStr(text,strlen(text)-7)); strmid(News[hAdd1], string, 0, strlen(string));
format(string, sizeof(string), "%s",sendername); strmid(News[hContact1], string, 0, strlen(string));
News[hTaken1] = 1; PlacedNews[playerid] = 1;
News[hTaken1] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Umieœci³eœ news na kanale Hitman Agency.");
return 0;
}
Expand All @@ -6963,15 +6970,14 @@ public OnPlayerText(playerid, text[])
}
else if(strcmp(x_nr,"2",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, "Ten numer jest zajêty, usuñ wiadomoœæ z tego numeru !"); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, "Musisz mieæ 3 rangê aby pisaæ newsy na kanale Hitman Agency !"); return 0; }
if(News[hTaken2] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, "News jest za krótki !"); return 0; }
format(string, sizeof(string), "%s",rightStr(text,strlen(text)-7)); strmid(News[hAdd2], string, 0, strlen(string));
format(string, sizeof(string), "%s",sendername); strmid(News[hContact2], string, 0, strlen(string));
News[hTaken2] = 1; PlacedNews[playerid] = 1;
News[hTaken2] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Umieœci³eœ news na kanale Hitman Agency.");
return 0;
}
Expand All @@ -6983,15 +6989,14 @@ public OnPlayerText(playerid, text[])
}
else if(strcmp(x_nr,"3",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, "Ten numer jest zajêty, usuñ wiadomoœæ z tego numeru !"); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, "Musisz mieæ 3 rangê aby pisaæ newsy na kanale Hitman Agency !"); return 0; }
if(News[hTaken3] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, "News jest za krótki !"); return 0; }
format(string, sizeof(string), "%s",rightStr(text,strlen(text)-7)); strmid(News[hAdd3], string, 0, strlen(string));
format(string, sizeof(string), "%s",sendername); strmid(News[hContact3], string, 0, strlen(string));
News[hTaken3] = 1; PlacedNews[playerid] = 1;
News[hTaken3] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Umieœci³eœ news na kanale Hitman Agency.");
return 0;
}
Expand All @@ -7003,15 +7008,14 @@ public OnPlayerText(playerid, text[])
}
else if(strcmp(x_nr,"4",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, "Ten numer jest zajêty, usuñ wiadomoœæ z tego numeru !"); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, "Musisz mieæ 3 rangê aby pisaæ newsy na kanale Hitman Agency !"); return 0; }
if(News[hTaken4] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, "News jest za krótki !"); return 0; }
format(string, sizeof(string), "%s",rightStr(text,strlen(text)-7)); strmid(News[hAdd4], string, 0, strlen(string));
format(string, sizeof(string), "%s",sendername); strmid(News[hContact4], string, 0, strlen(string));
News[hTaken4] = 1; PlacedNews[playerid] = 1;
News[hTaken4] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Umieœci³eœ news na kanale Hitman Agency.");
return 0;
}
Expand All @@ -7023,15 +7027,14 @@ public OnPlayerText(playerid, text[])
}
else if(strcmp(x_nr,"5",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, "Ten numer jest zajêty, usuñ wiadomoœæ z tego numeru !"); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, "Musisz mieæ 3 rangê aby pisaæ newsy na kanale Hitman Agency !"); return 0; }
if(News[hTaken5] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, "News jest za krótki !"); return 0; }
format(string, sizeof(string), "%s",rightStr(text,strlen(text)-7)); strmid(News[hAdd5], string, 0, strlen(string));
format(string, sizeof(string), "%s",sendername); strmid(News[hContact5], string, 0, strlen(string));
News[hTaken5] = 1; PlacedNews[playerid] = 1;
News[hTaken5] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Umieœci³eœ news na kanale Hitman Agency.");
return 0;
}
Expand Down Expand Up @@ -7814,6 +7817,11 @@ public OnPlayerStreamIn(playerid, forplayerid)
return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
return 0; //turn off singleplayer workshops
}

AntiDeAMX() //suprise motherfucker
{
new whack[][] =
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.1"
#define VERSION "v2.7.2"
2 changes: 1 addition & 1 deletion gamemodes/commands/cmd/carhelp.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ YCMD:carhelp(playerid, params[], help)
{
if(GUIExit[playerid] == 0)
{
ShowPlayerDialogEx(playerid, 449, DIALOG_STYLE_MSGBOX, "Komendy auta", "/parkuj\n/auto\n/autoklucze\n/dajklucze\n/oddajklucze\n/dajauto\n/sprzedajlodz\n/sprzedajheli\n/lwymiana\n/hwymiana\n/garazuj\n/wywalklucze", "Wyjdź", "Wyjdz");
ShowPlayerDialogEx(playerid, 449, DIALOG_STYLE_MSGBOX, "Komendy auta", "/parkuj\n/auto\n/autoklucze\n/dajklucze\n/oddajklucze\n/dajauto\n/sprzedajlodz\n/sprzedajheli\n/lwymiana\n/hwymiana\n/garazuj\n/wywalklucze\n/lock", "Wyjdź", "Wyjdz");
}
return 1;
}
2 changes: 1 addition & 1 deletion gamemodes/commands/cmd/dajklucze.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ YCMD:dajklucze(playerid, params[], help)
{
if(playa != INVALID_PLAYER_ID)
{
if(playerid == playa) return sendErrorMessage(playerid, "Sobie chcesz dać klucze? Pijany jesteś?");
if(playa == playerid) return sendErrorMessage(playerid, "Sam sobie chcesz dać klucze, pijany jesteś? :D");
if(PlayerInfo[playa][pKluczeAuta] == 0)
{
if(PlayerInfo[playerid][pCars][numerp] == 0) return sendErrorMessage(playerid, "Nie masz wozu pod tym numerem");
Expand Down
20 changes: 9 additions & 11 deletions gamemodes/commands/cmd/fooc.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
YCMD:fooc(playerid, params[], help)
{
new string[256];
new sendername[MAX_PLAYER_NAME];

if(IsPlayerConnected(playerid))
{
Expand All @@ -40,7 +39,6 @@ YCMD:fooc(playerid, params[], help)
sendTipMessageEx(playerid, TEAM_CYAN_COLOR, "Nie mo¿esz pisaæ poniewa¿ jesteœ wyciszony");
return 1;
}*/
GetPlayerName(playerid, sendername, sizeof(sendername));
if(isnull(params))
{
sendTipMessage(playerid, "U¿yj (/fo)oc [tekst]");
Expand All @@ -51,7 +49,7 @@ YCMD:fooc(playerid, params[], help)
new member = GetPlayerFraction(playerid);
if(member > 0 && PlayerInfo[playerid][pTajniak] == 0)
{
format(string, sizeof(string), "** (( %s [%d] %s: %s )) **", FracRang[member][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], sendername, params);
format(string, sizeof(string), "** (( %s [%d] %s: %s )) **", FracRang[member][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], GetNickEx(playerid), params);
SendFamilyMessage(member, TEAM_AZTECAS_COLOR, string);
SendDiscordFracMessage(member, string);
//Tajniacy
Expand All @@ -62,41 +60,41 @@ YCMD:fooc(playerid, params[], help)
}
else if(PlayerInfo[playerid][pTajniak] == 1)
{
format(string, sizeof(string), "** (( %s [%d] %s: %s )) **", FracRang[FRAC_GROOVE][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], sendername, params);
format(string, sizeof(string), "** (( %s [%d] %s: %s )) **", FracRang[FRAC_GROOVE][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], GetNickEx(playerid), params);
SendFamilyMessage(FRAC_GROOVE, TEAM_AZTECAS_COLOR, string);
SendTajniakMessage(1, TEAM_AZTECAS_COLOR, string);
}
else if(PlayerInfo[playerid][pTajniak] == 2)
{
format(string, sizeof(string), "** (( %s [%d] %s: %s )) **", FracRang[FRAC_BALLAS][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], sendername, params);
format(string, sizeof(string), "** (( %s [%d] %s: %s )) **", FracRang[FRAC_BALLAS][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], GetNickEx(playerid), params);
SendFamilyMessage(FRAC_BALLAS, TEAM_AZTECAS_COLOR, string);
SendTajniakMessage(2, TEAM_AZTECAS_COLOR, string);
}
else if(PlayerInfo[playerid][pTajniak] == 3)
{
format(string, sizeof(string), "** (( %s [%d] %s: %s )) **", FracRang[FRAC_LCN][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], sendername, params);
format(string, sizeof(string), "** (( %s [%d] %s: %s )) **", FracRang[FRAC_LCN][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], GetNickEx(playerid), params);
SendFamilyMessage(FRAC_LCN, TEAM_AZTECAS_COLOR, string);
SendTajniakMessage(3, TEAM_AZTECAS_COLOR, string);
}
else if(PlayerInfo[playerid][pTajniak] == 4)
{
format(string, sizeof(string), "** (( %s [%d] %s: %s )) **", FracRang[FRAC_YKZ][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], sendername, params);
format(string, sizeof(string), "** (( %s [%d] %s: %s )) **", FracRang[FRAC_YKZ][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], GetNickEx(playerid), params);
SendFamilyMessage(FRAC_YKZ, TEAM_AZTECAS_COLOR, string);
SendTajniakMessage(4, TEAM_AZTECAS_COLOR, string);
}
else if(PlayerInfo[playerid][pTajniak] == 5)
{
format(string, sizeof(string), "** (( %s [%d] %s: %s )) **", FracRang[FRAC_VAGOS][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], sendername, params);
format(string, sizeof(string), "** (( %s [%d] %s: %s )) **", FracRang[FRAC_VAGOS][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], GetNickEx(playerid), params);
SendFamilyMessage(FRAC_VAGOS, TEAM_AZTECAS_COLOR, string);
SendTajniakMessage(5, TEAM_AZTECAS_COLOR, string);
}
else if(GetPlayerOrg(playerid) != 0)
{
member = GetPlayerOrg(playerid);
//Przypisane rangi
if(strlen(FamRang[member][PlayerInfo[playerid][pRank]]) > 1) format(string, sizeof(string), "** (( %s [%d] %s: %s. )) **", FamRang[member][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], sendername, params);
if(strlen(FamRang[member][PlayerInfo[playerid][pRank]]) > 1) format(string, sizeof(string), "** (( %s [%d] %s: %s. )) **", FamRang[member][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], GetNickEx(playerid), params);
//Rangi podstawowe
else format(string, sizeof(string), "** (( %s [%d] %s: %s )) **", FamRang[0][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], sendername, params);
else format(string, sizeof(string), "** (( %s [%d] %s: %s )) **", FamRang[0][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], GetNickEx(playerid), params);
SendNewFamilyMessage(member, TEAM_AZTECAS_COLOR, string);
SendDiscordOrgMessage(member, string);
}
Expand All @@ -106,7 +104,7 @@ YCMD:fooc(playerid, params[], help)
else if(GetPlayerFraction(playerid) == FRAC_GOV || GetPlayerFraction(playerid) == FRAC_BOR|| GetPlayerOrg(playerid) == 1) //DMV i BOR po³aczenie
{
new member = GetPlayerFraction(playerid);
format(string, sizeof(string), "** (( %s [%d] %s: %s )) **", FracRang[member][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], sendername, params);
format(string, sizeof(string), "** (( %s [%d] %s: %s )) **", FracRang[member][PlayerInfo[playerid][pRank]],PlayerInfo[playerid][pRank], GetNickEx(playerid), params);
SendFamilyMessage(FRAC_GOV, TEAM_AZTECAS_COLOR, string);
SendFamilyMessage(FRAC_BOR, TEAM_AZTECAS_COLOR, string);
SendNewFamilyMessage(FAMILY_SAD, TEAM_BLUE_COLOR, string);
Expand Down
2 changes: 1 addition & 1 deletion gamemodes/commands/cmd/givegun.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ YCMD:givegun(playerid, params[], help)

if(ammo <1||ammo > 99999)
{ sendTipMessageEx(playerid, COLOR_GRAD1, "Amunicja mo¿e byæ od 1 do 99999 !"); return 1; }
if(PlayerInfo[playerid][pAdmin] >= 5000 || IsAScripter(playerid))
if(PlayerInfo[playerid][pAdmin] >= 5000)
{
if(IsPlayerConnected(playa))
{
Expand Down
2 changes: 1 addition & 1 deletion gamemodes/commands/cmd/glosnik.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

YCMD:glosnik(playerid, params[], help)
{
if((PlayerInfo[playerid][pMember] == 9 && PlayerInfo[playerid][pRank] >= 3) || PlayerInfo[playerid][pLider] == 9 || (GetPlayerOrg(playerid) == 19 && IsPlayerInRangeOfPoint(playerid, 75.0 , 578.6193,-2195.7708,1.6288) && PlayerInfo[playerid][pRank] >= 3) || (GetPlayerOrg(playerid) == FAMILY_IBIZA && PlayerInfo[playerid][pRank] >= 6))
if((PlayerInfo[playerid][pMember] == 9 && PlayerInfo[playerid][pRank] >= 3) || PlayerInfo[playerid][pLider] == 9 || (GetPlayerOrg(playerid) == 19 && IsPlayerInRangeOfPoint(playerid, 75.0 , 578.6193,-2195.7708,1.6288) && PlayerInfo[playerid][pRank] >= 3))
{
if(SanDuty[playerid] == 0 && PlayerInfo[playerid][pMember] == 9) return sendErrorMessage(playerid, "Musisz byæ na s³u¿bie San News");
if(SANradio == 0)
Expand Down
Loading

0 comments on commit debfcd8

Please sign in to comment.