Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock SkinyCorner[] =
- {
- 2, 4, 6, 7, 13, 15, 19, 21, 22, 23, 24, 25, 28, 29, 30, 44, 47, 48, 65, 66, 67, 143, 144, 180, 182, 184, 190, 193, 262, 273
- }; // 30
- new Float:CornerSpawn[12][4]=
- {
- {1684.3773,-2086.4626,13.5469,0.4292},
- {2761.9941,-2015.4427,13.5620,270.6478},
- {2823.2334,-1466.2240,16.2500,180.2579},
- {2630.9182,-1600.9365,12.1635,269.9246},
- {2550.3235,-1209.2046,54.5403,184.8661},
- {2209.8579,-1148.9612,25.7475,264.6206},
- {2402.2468,-1344.1748,25.3429,266.8655},
- {1978.4595,-1232.3274,20.0469,191.2826},
- {2427.7283,-1633.2139,13.4112,179.7761},
- {2344.8398,-1949.5105,13.5651,32.1162},
- {2063.2766,-1779.8597,13.5557,94.4358},
- {2507.9312,-1471.7263,24.0362,326.6046}
- };
- PublicFunc::Corner_OPD(playerid, reason)
- {
- if(GetPVarInt(playerid, "ProcesCorner"))
- {
- schowajmnie(playerid);
- }
- }
- stock schowajmnie(playerid) {
- DestroyActor(GetPVarInt(playerid, "ProcesCorner") - 1);
- DeletePVar(playerid, "ProcesCorner");
- DeletePVar(playerid, "ProcesCornerID");
- DeletePVar(playerid, "ProcesCornerRodzaj");
- DisablePlayerCheckpoint(playerid);
- }
- PublicFunc::Corner_OPEC(playerid)
- {
- if(GetPVarInt(playerid, "ProcesCorner") >= 1)
- {
- if(PlayerToPoint(2.5, playerid, CornerSpawn[GetPVarInt(playerid, "ProcesCornerID")][0], CornerSpawn[GetPVarInt(playerid, "ProcesCornerID")][1], CornerSpawn[GetPVarInt(playerid, "ProcesCornerID")][2]))
- {
- DaneGracza[playerid][pLimitCorner] += 1;
- new Wartosc = random(4);
- new nazwy[][] = {"zielska", "kokainy", "amfetaminy", "cracku"};
- new str[50];
- SetPVarInt(playerid, "ProcesCornerRodzaj", Wartosc+1);
- format(str, sizeof str, "Potrzebny mi jest gram %s, masz to gówno?", nazwy[Wartosc]);
- PokazDialog(playerid, 217, DIALOG_STYLE_MSGBOX, "{A4CE30}Corner", str, "Tak", "Nie");
- }
- }
- return 1;
- }
- PublicFunc::Corner_ODR(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 217)
- {
- if(response)
- {
- if(GetPVarInt(playerid, "ProcesCornerRodzaj"))
- {
- for(new p = 0; p < sizeof(DanePrzedmiotu); p++)
- {
- if(DanePrzedmiotu[p][pID] && DanePrzedmiotu[p][pTyp] == TYP_NARKOTYK && DanePrzedmiotu[p][pGracz] == DaneGracza[playerid][pID] && DanePrzedmiotu[p][pWartosc2] == GetPVarInt(playerid, "ProcesCornerRodzaj"))
- {
- if(DanePrzedmiotu[p][pWartosc1] > 1)
- {
- DanePrzedmiotu[p][pWartosc1] -= 1;
- }
- else
- {
- SkasujPrzedmiot(p);
- }
- Info(playerid, "Transakcja zakończona pomyślnie.");
- schowajmnie(playerid);
- return 1;
- }
- }
- }
- Info(playerid, "Nie posiadasz wymaganego przedmiotu i transakcja nie powiodła się.");
- }
- schowajmnie(playerid);
- }
- return 1;
- }
- CMD:corner(playerid, cmdtext[])
- {
- if(SprawdzUprawnieniaGrupy(playerid, GRUPA_TYP_GANG))
- {
- if(GetPVarInt(playerid, "ProcesCorner") >= 1) return Info(playerid, "Aktualnie jesteś w trakcie procesu sprzedaży.");
- else if(DaneGracza[playerid][pLimitCorner] >= 5) return Info(playerid, "Wykorzystałeś już dzienny limit i nie możesz sprzedać więcej narkotyków, spróbuj jutro.");
- DeletePVar(playerid, "ProcesCorner");
- Info(playerid, "Teraz musisz się udać w wskazane miejsce na mapie, aby porozmawiać z klientem.");
- new ID = random(12);
- SetPlayerCheckpoint(playerid, CornerSpawn[ID][0], CornerSpawn[ID][1], CornerSpawn[ID][2], 2.0);
- SetPVarInt(playerid, "ProcesCorner", CreateActor(SkinyCorner[random(30)], CornerSpawn[ID][0], CornerSpawn[ID][1], CornerSpawn[ID][2], CornerSpawn[ID][3]) + 1);
- SetPVarInt(playerid, "ProcesCornerID", ID);
- new str[32]; format(str, sizeof(str), "%d | %d", GetPVarInt(playerid, "ProcesCorner"), GetPVarInt(playerid, "ProcesCornerID")); WiadomoscMe(playerid, str);
- }
- else
- {
- GameTextForPlayer(playerid, "Brak uprawnien", 2000, 3);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement