Jump to content
Prosíme všetkých užívateľov, ktorý sa chcú opätovne pripojiť na discord aby znovu spárovali svoje účty kliknutím na "Discord" v navigácií a pripojili sa na server Read more... ×

Marshall_

Uživatel
  • Příspěvků

    17
  • Registrován

  • Aktivní

Reputace

0 Na nule

About Marshall_

  • Moto
    Bronze I - nováček
  • Narozeniny 11.2.1999

Návštěvníci

297 profile views
  1. Marshall_

    návod Actory - nehybné postavy (0.3.7) [2/5]

    Skvelé, hodí sa to ako taký menší detail na môj server
  2. Marshall_

    pomoc Ammo systém

    Problém som vyriešil sám. Mal chybu som mal v tomto: new AmmoDialog; Správne to malo byť takto a to spôsobovalo to, že si kod plietol dialogy a hádzalo mi tam kicky z dôvodu register a login systému. #define AmmoDialog; ďakujem za ochotu
  3. Marshall_

    pomoc Ammo systém

    Na serveri nemám žiaden anticheat
  4. Marshall_

    pomoc Ammo systém

    Zdravím, Vytvoril som si ammunation systém a mám tam trošku problém. Ak si kúpim zbraň, napíše mi to Server Closed the Conenction Tu je kód: // This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #define SCERVENA 0xFF0000FF #define ZELENA 0x55D57BFF #pragma unused ret_memcpy #include <a_samp> #include <dini> #include <dudb> #include <dutils> new AmmoVchod; new AmmoVychod; new AmmoNakup; new AmmoDialog; new Float: Armour; #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else main() { print("\n----------------------------------"); print(" Blank Gamemode by your name here"); print("----------------------------------\n"); } #endif public OnGameModeInit() { DisableInteriorEnterExits(); UsePlayerPedAnims(); SetGameModeText("Blank Script"); AddPlayerClass(0, 1349.5918,-1281.9243,13.3828,280.1707, 0, 0, 0, 0, 0, 0); AddPlayerClass(1, 1349.5918,-1281.9243,13.3828,280.1707, 0, 0, 0, 0, 0, 0); AmmoVchod = CreatePickup(1318, 23, 1368.3568,-1278.9354,13.5469, -1); AmmoVychod = CreatePickup(1318, 23, 286.1490,-40.6444,1001.5156, -1); AmmoNakup = CreatePickup(2061, 23, 296.5277,-38.1524,1001.5156, -1); return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, 1349.5918,-1281.9243,13.3828); SetPlayerCameraPos(playerid, 1352.8612,-1283.1831,13.3828); SetPlayerCameraLookAt(playerid, 1349.5918,-1281.9243,13.3828); return 1; } public OnPlayerConnect(playerid) { SetPlayerMapIcon(playerid, 3, 1365.5172,-1278.8087,13.5469, 6, 0); return 1; } public OnPlayerDisconnect(playerid, reason) { return 1; } public OnPlayerSpawn(playerid) { return 1; } public OnPlayerDeath(playerid, killerid, reason) { return 1; } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (!strcmp("/peniaze", cmdtext)) { GivePlayerMoney(playerid, 2000); return 1; } return 0; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { return 1; } public OnPlayerEnterCheckpoint(playerid) { return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnRconCommand(cmd[]) { return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == AmmoVchod) { SetPlayerPos(playerid,286.0562,-38.7073,1001.5156); SetPlayerInterior(playerid, 1); SetPlayerFacingAngle(playerid, 358.6731); return 1; } if(pickupid == AmmoVychod) { SetPlayerPos(playerid, 1364.6307,-1279.0601,13.5469); SetPlayerInterior(playerid, 0); SetPlayerFacingAngle(playerid, 90.0); } if(pickupid == AmmoNakup) { ShowPlayerDialog(playerid, AmmoDialog, DIALOG_STYLE_LIST, "Ammunation", "Boxer\nObušok\nBaseballova pálka\nKatana\nNôž\n9mm\n9mm s tlmičom\nDesert Eagle\nTec-9\nMicro SMG\nBrokovnica\nUpilovaná brokovnica\nBojová brokovnica\nGranáty\nVybušné nálože\nBrnenie\nMP5\nPuška\nOdstreľovacia puška\nM4\nAK47\nPadák","Kupit","Koniec"); SetPlayerPos(playerid, 296.4861,-36.3734,1001.5156); } else { } return 1; } public OnVehicleMod(playerid, vehicleid, componentid) { return 1; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { return 1; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { return 1; } public OnRconLoginAttempt(ip[], password[], success) { return 1; } public OnPlayerUpdate(playerid) { return 1; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } public OnPlayerStreamOut(playerid, forplayerid) { return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; } public OnVehicleStreamOut(vehicleid, forplayerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == AmmoDialog) { if(response == 1) { switch(listitem) { case 0: { if(GetPlayerMoney(playerid) < 150) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else if(GetPlayerWeapon(playerid) != 1) { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili Boxer!"); GivePlayerMoney(playerid, -150); GivePlayerWeapon(playerid, 1, 1); } if(GetPlayerWeapon(playerid) == 1) { SendClientMessage(playerid, SCERVENA, "Túto zbraň už máš!"); } } case 1: { if(GetPlayerMoney(playerid) < 200) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else if(GetPlayerWeapon(playerid) != 3) { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili Obušok!"); GivePlayerMoney(playerid, -200); GivePlayerWeapon(playerid, 3, 1); } if(GetPlayerWeapon(playerid) == 3) { SendClientMessage(playerid, SCERVENA, "Túto zbraň už máš!"); } } case 2: { if(GetPlayerMoney(playerid) < 100) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else if(GetPlayerWeapon(playerid) != 5) { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili Baseballovú pálku!"); GivePlayerMoney(playerid, -100); GivePlayerWeapon(playerid, 5, 1); } if(GetPlayerWeapon(playerid) == 5) { SendClientMessage(playerid, SCERVENA, "Túto zbraň už máš!"); } } case 3: { if(GetPlayerMoney(playerid) < 250) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else if(GetPlayerWeapon(playerid) != 8) { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili Katanu!"); GivePlayerMoney(playerid, -250); GivePlayerWeapon(playerid, 8, 1); } if(GetPlayerWeapon(playerid) == 8) { SendClientMessage(playerid, SCERVENA, "Túto zbraň už máš!"); } } case 4: { if(GetPlayerMoney(playerid) < 1550) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else if(GetPlayerWeapon(playerid) != 4) { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili Nôž!"); GivePlayerMoney(playerid, -1550); GivePlayerWeapon(playerid, 4, 1); } if(GetPlayerWeapon(playerid) == 4) { SendClientMessage(playerid, SCERVENA, "Túto zbraň už máš!"); } } case 5: { if(GetPlayerMoney(playerid) < 320) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili 9mm pištoľ!"); GivePlayerMoney(playerid, -320); GivePlayerWeapon(playerid, 22, 30); } } case 6: { if(GetPlayerMoney(playerid) < 400) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili 9mm pištoľ s tlmičom!"); GivePlayerMoney(playerid, -400); GivePlayerWeapon(playerid, 23, 25); } } case 7: { if(GetPlayerMoney(playerid) < 450) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili pištoľ Desert Eagle!"); GivePlayerMoney(playerid, -450); GivePlayerWeapon(playerid, 24, 21); } } case 8: { if(GetPlayerMoney(playerid) < 600) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili Tec-9!"); GivePlayerMoney(playerid, -600); GivePlayerWeapon(playerid, 32, 30); } } case 9: { if(GetPlayerMoney(playerid) < 600) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili Micro SMG!"); GivePlayerMoney(playerid, -600); GivePlayerWeapon(playerid, 28, 25); } } case 10: { if(GetPlayerMoney(playerid) < 750) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili Brokovnicu!"); GivePlayerMoney(playerid, -750); GivePlayerWeapon(playerid, 25, 15); } } case 11: { if(GetPlayerMoney(playerid) < 800) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili Upilovanú brokovnicu!"); GivePlayerMoney(playerid, -800); GivePlayerWeapon(playerid, 26, 16); } } case 12: { if(GetPlayerMoney(playerid) < 900) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili Bojovú brokovnicu!"); GivePlayerMoney(playerid, -900); GivePlayerWeapon(playerid, 27, 15); } } case 13: { if(GetPlayerMoney(playerid) < 500) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili Granáty!"); GivePlayerMoney(playerid, -500); GivePlayerWeapon(playerid, 16, 3); } } case 14: { if(GetPlayerMoney(playerid) < 800) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili Výbušné nálože!"); GivePlayerMoney(playerid, -800); GivePlayerWeapon(playerid, 39, 5); } } case 15: { if(GetPlayerMoney(playerid) < 200) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else if(GetPlayerArmour(playerid, Armour) != 100.0) { if(Armour < 100.0) { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili Brnenie!"); GivePlayerMoney(playerid, -200); SetPlayerArmour(playerid, 100.0); } else if(GetPlayerArmour(playerid, Armour)) { if(Armour == 100.0) { SendClientMessage(playerid, SCERVENA, "Nemôžete si kúpiť viac Brnenia!"); } } } } case 16: { if(GetPlayerMoney(playerid) < 1000) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili MP5!"); GivePlayerMoney(playerid, -1000); GivePlayerWeapon(playerid, 29, 30); } } case 17: { if(GetPlayerMoney(playerid) < 1200) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili Pušku!"); GivePlayerMoney(playerid, -1200); GivePlayerWeapon(playerid, 33, 15); } } case 18: { if(GetPlayerMoney(playerid) < 1500) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili Odstreľovaciu pušku!"); GivePlayerMoney(playerid, -1500); GivePlayerWeapon(playerid, 34, 10); } } case 19: { if(GetPlayerMoney(playerid) < 1100) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili M4!"); GivePlayerMoney(playerid, -1100); GivePlayerWeapon(playerid, 31, 20); } } case 20: { if(GetPlayerMoney(playerid) < 900) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili AK47!"); GivePlayerMoney(playerid, -900); GivePlayerWeapon(playerid, 30, 20); } } case 21: { if(GetPlayerMoney(playerid) < 120) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } else if(GetPlayerWeapon(playerid) != 46) { SendClientMessage(playerid, ZELENA, "Úspešne ste si zakúpili Padák!"); GivePlayerMoney(playerid, -120); GivePlayerWeapon(playerid, 46, 20); } if(GetPlayerWeapon(playerid) == 46) { SendClientMessage(playerid, SCERVENA, "Už jeden padák vlastníte!"); } } } } } return 1; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; }
  5. Marshall_

    pomoc Načítanie zbrani a pozície cez dini

    Narazil som na ďalší problém, ktorý nejako neviem vyriešiť. Ak sa hráč zaregistruje, chcem aby sa jeho pozícia nastavila na defaultný spawn, no ak sa prihlási znova, už bude na pozícii, na ktorej bol. Funguje to z časti. Hráč sa po registrácii spawne v Blueberry pod zem. Keď ho to portne naspäť a hráč sa pohne, po opätovnom prihlásení je tam, kde sa odpojil. Niekto nejaké rady?
  6. Marshall_

    pomoc Načítanie zbrani a pozície cez dini

    Ten dementný pocit, keď hľadáš kde máš chybu a nakoniec to je len v sekcii Dik moc. Dal som to do OnPlayerSpawn.
  7. Marshall_

    pomoc Načítanie zbrani a pozície cez dini

    No práve tento kód nefunguje. Vždy ho po stlačení tlačidla Spawn hodí na Defaultny spawn.
  8. Marshall_

    pomoc Načítanie zbrani a pozície cez dini

    Zdravím, Mám menší problém s načítaním pozície a zbraní. Presnejšie pozíciu viem uložiť no nie načítať a pre zbrane neviem ani jedno. Prosím vyvarujte sa komentárom: dini je pomalé apod. Uprímne ma to nezaujíma, pretože tento server nie je verejný a verejný nikdy nebude. Tu je kód. Predom ďakujem za odpoveď. public OnPlayerDisconnect(playerid, reason) { if(STATISTIKY[playerid][Login] == true) { dUserSetINT(NickName(playerid)).("Peniaze", GetPlayerMoney(playerid)); GetPlayerPos(playerid, PosX, PosY, PosZ); dUserSetFLOAT(NickName(playerid)).("PosX", PosX); dUserSetFLOAT(NickName(playerid)).("PosY", PosY); dUserSetFLOAT(NickName(playerid)).("PosZ", PosZ); STATISTIKY[playerid][Login] = false; } return 1; } if(dialogid == LOGIN_DIALOG) //Ak to je prihlasovací dialóg { if(response == 1) { if(udb_CheckLogin(NickName(playerid), inputtext)) //Ak sa podarí prihlásiť { GivePlayerMoney(playerid, dUserINT(NickName(playerid)).("Peniaze")-GetPlayerMoney(playerid)); SetPlayerPos(playerid, dUserFLOAT(NickName(playerid)).("PosX"),dUserFLOAT(NickName(playerid)).("PosY"),dUserFLOAT(NickName(playerid)).("PosZ")); STATISTIKY [playerid][Login] = true; } }
  9. Marshall_

    pomoc AddPlayerClass Bug

    Ďakujem za rady.Už som na to včera prišiel s niCeovou pomocou. Kód som vytvoril nejako takto. public OnPlayerDeath(playerid, killerid, reason) { GameTextForPlayer(playerid, "Umreli ste!", 3500, 2); if (GetPlayerMoney(playerid) >= 2000) { GivePlayerMoney(playerid, -1900); } else if (GetPlayerMoney(playerid) < 2000) { ResetPlayerMoney(playerid); } else { return 1; } PlayerSmrt[playerid] = 1; return 1; } Následne v OnPlayerPickUpPickup if(pickupid == SrdieckoNemocnica) { GetPlayerHealth(playerid, Zdravie); if(Zdravie >= 100.0) return SendClientMessage(playerid, SCERVENA, "Nemôžete si doplniť zdravie!"); else if (Zdravie < 100.0) { if (GetPlayerMoney(playerid) >= 200) { SetPlayerHealth(playerid, 100.0); GivePlayerMoney(playerid, -200); SendClientMessage(playerid, ZELENA, "Doplnili ste si zdravie!"); DestroyPickup(SrdieckoNemocnica); SrdieckoNemocnica = 0; } else if (GetPlayerMoney(playerid) <= 200) { SendClientMessage(playerid, SCERVENA, "Nedostatok financií!"); } } else { return 1; } return 1; }
  10. Marshall_

    pomoc AddPlayerClass Bug

    Tu je celý môj kód. Nikde to tam nie je práve. #include <a_samp> #include <strlib> #define BIELA 0xFFFFFFFF #define MODRA 0x5555FFFF #define ZELENA 0x55D57BFF #define RUZOVA 0xFF80C0FF #define CERVENA 0xFF2F2FFF #define ZLTA 0xFFFF80FF #define SCERVENA 0xFF0000FF #define ORANZOVA 0xE78416FF #define FIALOVA 0x800080FF new JobPrevoznik[256]; new RyderHouseIn; new RyderHouseOut; new SweetHouseIn; new SweetHouseOut; new NemocnicaIn; new NemocnicaOut; new SrdieckoNemocnica; new Float: Zdravie; new Text:LogoMaturita; new PlayerSmrt[MAX_PLAYERS]; //new Peniaze; main() { print("\n----------------------------------"); print(" Maturita 2018 - Matúš Daňo"); print("----------------------------------\n"); } public OnGameModeInit() { SetGameModeText("Maturita"); AddPlayerClass(1,2532.0852,-1665.7792,15.1675,87.6723,0,0,0,0,0,0); //spawn skin1 AddPlayerClass(2,2532.0852,-1665.7792,15.1675,87.6723,0,0,0,0,0,0); //spawn skin2 AddPlayerClass(3,2532.0852,-1665.7792,15.1675,87.6723,0,0,0,0,0,0); //spawn skin3 AddPlayerClass(4,2532.0852,-1665.7792,15.1675,87.6723,0,0,0,0,0,0); //spawn skin4 AddPlayerClass(5,2532.0852,-1665.7792,15.1675,87.6723,0,0,0,0,0,0); //spawn skin5 AddPlayerClass(6,2532.0852,-1665.7792,15.1675,87.6723,0,0,0,0,0,0); //spawn skin6 AddPlayerClass(156,2532.0852,-1665.7792,15.1675,87.6723,0,0,0,0,0,0); //spawn skin156 UsePlayerPedAnims(); DisableInteriorEnterExits(); //vozidla AddStaticVehicle(428,2505.6091,-1694.0107,13.6809,359.4409,191,192); // SecurityJob //Pickupy RyderHouseIn = CreatePickup(1318, 23, 2459.5662,-1688.6664,13.5335, -1); RyderHouseOut = CreatePickup(1318, 23, 2455.7358,-1705.6257,1013.5078, -1); SweetHouseIn = CreatePickup(1318, 23, 2521.7126,-1678.9977,15.4970, -1); SweetHouseOut = CreatePickup(1318, 23, 2526.2583,-1679.4021,1015.4986, -1); NemocnicaIn = CreatePickup (1318, 23, 2033.9659,-1403.5061,17.2830, -1); NemocnicaOut = CreatePickup (1318, 23, 388.5657,173.8891,1008.3828, -1); SrdieckoNemocnica = CreatePickup(1240, 2, 364.6554,173.7339,1008.3893, -1); //Textdrawy LogoMaturita = TextDrawCreate(552.855041, 3.499990, "MATURITA 2018"); TextDrawLetterSize(LogoMaturita, 0.491228, 1.821666); TextDrawAlignment(LogoMaturita, 2); TextDrawColor(LogoMaturita, -32513); TextDrawSetShadow(LogoMaturita, 0); TextDrawSetOutline(LogoMaturita, 1); TextDrawBackgroundColor(LogoMaturita, 255); TextDrawFont(LogoMaturita, 1); TextDrawSetProportional(LogoMaturita, 1); return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, 2532.0852,-1665.7792,15.1675); //Nastavenie spawnu SetPlayerCameraPos(playerid, 2528.6851,-1665.5844,15.1674); //Pozícia kamery SetPlayerFacingAngle(playerid, 90.0); //Uhol pohľadu SetPlayerCameraLookAt(playerid, 2532.0852,-1665.7792,15.1675); //Miesto kde sa kamera pozerá return 1; } public OnPlayerConnect(playerid) { PlayAudioStreamForPlayer(playerid, "https://www.gta-multiplayer.cz/audio/gta_sa_theme.mp3"); GivePlayerMoney(playerid, 3500); SendClientMessage(playerid, BIELA, "{ffffff}Skús si zahrať minihru - {e78416}/kocka"); SendClientMessage(playerid, BIELA, "{ffffff}Máš záujem si zarobiť? Sadni do {55d57b}Security Car {ffffff}a napíš - {55d57b}/prevoz!"); SetPlayerMapIcon(playerid, 1, 2450.7546,-1690.3250,13.5382, 34, 0); SetPlayerMapIcon(playerid, 2, 2532.2820,-1677.2820,19.9302, 38, 0); return 1; } public OnPlayerDisconnect(playerid, reason) { return 1; } public OnPlayerSpawn(playerid) { StopAudioStreamForPlayer(playerid); TextDrawShowForPlayer(playerid, LogoMaturita); if(PlayerSmrt[playerid] == 1) { SendClientMessage(playerid, BIELA, "{FF0000}[INFO] {ffffff}Ak umriete prídte o 2000$ a všetky zbrane!"); SetPlayerPos(playerid, 2027.1332,-1421.4132,16.9922); SetPlayerFacingAngle(playerid, 135); PlayerSmrt[playerid] = 0; return 1; } return 1; } public OnPlayerDeath(playerid, killerid, reason) { GameTextForPlayer(playerid, "Umreli ste!", 3500, 2); GivePlayerMoney(playerid, -1900); if(GetPlayerMoney(playerid) < 2000) { GivePlayerMoney(playerid, -GetPlayerMoney(playerid)); } SetPlayerPos(playerid, 2027.1332,-1421.4132,16.9922); PlayerSmrt[playerid] = 1; return 1; } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { //Farby nicku if (strcmp("/modra", cmdtext)== 0) { SetPlayerColor(playerid, 0x5555FFFF); SendClientMessage(playerid, MODRA, "{ffffff}Farba mena zmenená na {5555ff}modrú"); return 1; } if (strcmp("/ruzova", cmdtext)== 0) { SetPlayerColor(playerid, 0xFF80C0FF); SendClientMessage(playerid, RUZOVA, "{ffffff}Farba mena zmenená na {ff80c0}ružovú"); return 1; } if (strcmp("/zelena", cmdtext)== 0) { SetPlayerColor(playerid, 0x55D57BFF); SendClientMessage(playerid, ZELENA, "{ffffff}Farba mena zmenená na {55d57b}zelenú"); return 1; } if (strcmp("/zlta", cmdtext)== 0) { SetPlayerColor(playerid, 0xFFFF80FF); SendClientMessage(playerid, ZLTA, "{ffffff}Farba mena zmenená na {ffff80}žltú"); return 1; } if (strcmp("/cervena", cmdtext)==0) { SetPlayerColor(playerid, 0xFF2F2FFF); SendClientMessage(playerid, CERVENA, "{ffffff}Farba mena zmenená na {ff2f2f}červenú"); return 1; } //Farby nicku //Kocka if (!strcmp("/kocka", cmdtext, true)) { if (GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, SCERVENA, "Nedostatok financií na účte! Potrebuješ minimálne 1000$!"); GivePlayerMoney(playerid, -1000); new CisloHrac = random(6) + 1; new Vysledok[128]; format(Vysledok, sizeof(Vysledok), "Hodili ste %d", CisloHrac); SendClientMessage(playerid, ZELENA, Vysledok); new CisloPC = random(6) + 1; format(Vysledok, sizeof(Vysledok), "Počítač hodil %d", CisloPC); SendClientMessage(playerid, CERVENA, Vysledok); if (CisloHrac > CisloPC) { SendClientMessage(playerid, RUZOVA, "Vyhrali ste!"); GivePlayerMoney(playerid, 2000); } else if (CisloHrac < CisloPC) { SendClientMessage(playerid, RUZOVA, "Prehrali ste!"); } else { SendClientMessage(playerid, RUZOVA, "Remíza!"); GivePlayerMoney(playerid, 1000); } return 1; } //Kocka //Job -Prevoz penazi if (!strcmp("/prevoz", cmdtext)) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 428) { JobPrevoznik[playerid] = 1; SetPlayerCheckpoint(playerid,2305.4602,-1650.6775,14.5071,5); SendClientMessage(playerid, BIELA,"Vyzdvihnite {55d57b}peniaze {ffffff}v {aa59aa}Ten Green Bottles {ffffff}!"); return 1; } else { SendClientMessage(playerid, SCERVENA,"Musíte sedieť vo vozidle na prevoz peňazí!"); } } //Job -Prevoz penazi //Príkaz na samovraždu if(!strcmp("/kill", cmdtext, true)) { SetPlayerHealth(playerid, 0); return 1; } //Príkaz na samovraždu return SendClientMessage(playerid,SCERVENA,"Neznámy príkaz!"); } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { //Job - Prevoznik - ukončenie if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 428) { if(JobPrevoznik[playerid] > 0) { SendClientMessage(playerid, SCERVENA, "Ukončili ste zamestnanie prevozcu peňazí!"); JobPrevoznik[playerid] = 0; DisablePlayerCheckpoint(playerid); } } //Job - Prevoznik - ukončenie return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { return 1; } public OnPlayerEnterCheckpoint(playerid) { //Job - Prevoz penazi, checkpointy if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 428) { if(JobPrevoznik[playerid] == 1) { JobPrevoznik[playerid] = 2; SetPlayerCheckpoint(playerid,2428.2556,-1736.3909,13.4585,5); SendClientMessage(playerid, BIELA,"Vyzdvihnite {55d57b}peniaze {ffffff}v {aa59aa}MaxcMax-e {ffffff}!"); return 1; } if (JobPrevoznik[playerid] == 2) { JobPrevoznik[playerid] = 3; SetPlayerCheckpoint(playerid,2508.3140,-1726.9946,13.5469,5); SendClientMessage(playerid, BIELA,"Vyzdvihnite {55d57b}peniaze {ffffff}v {aa59aa}Pawnshop-e {ffffff}!"); return 1; } if (JobPrevoznik[playerid] == 3) { JobPrevoznik[playerid] = 4; SetPlayerCheckpoint(playerid,2473.0635,-1692.6638,13.5146,5); SendClientMessage(playerid, BIELA, "Doručte {55d57b}peniaze {ffffff}do {aa59aa}Ryderoveho domu {ffffff}!"); return 1; } if(JobPrevoznik[playerid] == 4) { JobPrevoznik[playerid] = 0; SendClientMessage(playerid, BIELA, "Úspešne ste doručili {55d57b}peniaze {ffffff}!"); SendClientMessage(playerid, SCERVENA, "{ff0000}Úspešne ste ukončili prácu prevozcu. Vystúpte z vozidla!"); SendClientMessage(playerid, BIELA, "Získali ste {55d57b}500$!"); GivePlayerMoney(playerid, 500); DisablePlayerCheckpoint(playerid); return 1; } } //Job - Prevoz penazi checkpointy return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnRconCommand(cmd[]) { return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == RyderHouseIn) { SetPlayerPos(playerid,2454.717041,-1700.871582,1013.515197); SetPlayerInterior(playerid, 2); return 1; } if(pickupid == RyderHouseOut) { SetPlayerPos(playerid, 2463.3657,-1688.2926,13.5165); SetPlayerInterior(playerid, 0); } if (pickupid == SweetHouseIn) { SetPlayerPos(playerid, 2527.654052,-1679.388305,1015.498596); SetPlayerInterior(playerid, 1); return 1; } if(pickupid == SweetHouseOut) { SetPlayerPos(playerid, 2518.1035,-1678.4446,14.4648); SetPlayerInterior(playerid, 0); } if(pickupid == NemocnicaIn) { SetPlayerPos(playerid, 384.808624,173.804992,1008.382812); SetPlayerInterior(playerid, 3); } if(pickupid == NemocnicaOut) { SetPlayerPos(playerid, 2033.8037,-1407.0389,17.1933); SetPlayerInterior(playerid, 0); } if(pickupid == SrdieckoNemocnica) { GetPlayerHealth(playerid, Zdravie); if(Zdravie == 100.0) { SendClientMessage(playerid, SCERVENA, "Nemôžete si doplniť zdravie!"); } else { if (GetPlayerMoney(playerid) < 200) { DestroyPickup(SrdieckoNemocnica); SendClientMessage(playerid, SCERVENA, "Nemôžete si doplniť zdravie, nedostatok financií!"); } SetPlayerHealth(playerid, 100); SendClientMessage(playerid, ZELENA, "Doplnili ste si zdravie za 200$"); GivePlayerMoney(playerid, -200); return 1; } } return 1; } public OnVehicleMod(playerid, vehicleid, componentid) { return 1; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { return 1; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { return 1; } public OnRconLoginAttempt(ip[], password[], success) { return 1; } public OnPlayerUpdate(playerid) { return 1; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } public OnPlayerStreamOut(playerid, forplayerid) { return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; } public OnVehicleStreamOut(vehicleid, forplayerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { return 1; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; } Sú tam ešte nejaké chyb ohľadom tej nemocnice, pretože neviem prísť na to, ako zabrániť tomu, že ak hráč umrie, a má menej ako 2000$ mu to nedalo peniaze do mínusu, ale na nulu
  11. Marshall_

    pomoc AddPlayerClass Bug

    Popis problému: Zdravím, Mám vytvorených zopár classov na skiny s ktorými sa hráč môže spawnúť. A však je medzi nimi aj CJov skin, ktorý nie je v kóde. Ak si ho zvolím tak sa mi spawne v LV miesto Gantonu v LS, kde je defaultný spawn. Tu máte aj video o tom, ako sa to prejavuje: Tu je kód Chyby/varování kompilátoru a při běhu: -- Kód: Dodatečné poznámky: --
  12. Marshall_

    pomoc Správa po vykonaní

    Skvelé Duff, ďakujem ti za pomoc Konečne to funguje. Samozrejme ďakujem všetkým za čas strávený pomáhaním a radami, vážim si to for tam bolo ešte z prvého kódu ktorý som si vytvoril. Čo sa týka riadku #define-u, bol tam z dôvodu, že mi to hádzalo errory typu: KockaCisloPC je undefinovaná. Tak či tak, znova ďakujem
  13. Marshall_

    pomoc Správa po vykonaní

    Bohužiaľ, toto vôbec nepomohlo.
  14. Marshall_

    pomoc Správa po vykonaní

    Ďakujem ešte raz za rady Vážim si to. Tu je kód: //Kocka if (strcmp("/kocka", cmdtext)== 0) { if (GetPlayerMoney(playerid) == 0){ SendClientMessage(playerid, SCERVENA, "Nedostatok financií na účte! Potrebuješ minimálne 1000$!"); } else { GivePlayerMoney(playerid, -1000); new KockaCislo = random(6) +1; new stringKockaCislo[128]; format(stringKockaCislo, sizeof(stringKockaCislo), "Hodili ste %d", KockaCislo); SendClientMessage(playerid, ZELENA,stringKockaCislo); for (new pc = 0; pc < MAX_PLAYERS; pc++) { new KockaCisloPC = random(6) +1; new stringKockaCisloPC[128]; format(stringKockaCisloPC, sizeof(stringKockaCisloPC), "Počítač hodil %d", KockaCisloPC); SendClientMessage(pc,CERVENA,stringKockaCisloPC); } #define KockaCisloPC 2 if(KockaCislo > KockaCisloPC) { SendClientMessage(playerid, RUZOVA, "Vyhrali ste!"); GivePlayerMoney(playerid, 2000); } else if(KockaCislo < KockaCisloPC) { SendClientMessage(playerid, RUZOVA, "Prehrali ste!"); } else { SendClientMessage(playerid, RUZOVA, "Remíza!"); GivePlayerMoney(playerid, 1000); } } return 1; } //Kocka No bohužiaľ vyskytol sa ďalší problém, ktorý netuším ako opraviť. Ako vidíte na obrázku, hodilo to remízu aj keď som hodil 2 a počítač 6. Viete niekto ako toto fixnúť?
  15. Marshall_

    pomoc Správa po vykonaní

    ďakujem EvoLve, že ma taká to primitívnosť nenapadla, naozaj... Inak HighPrint, ďakujem aj tebe. Nevedel som nájsť čo to znamená to %d %s apod Som nováčik a stále sa učím. Určite to vylepším . Taktiež vie mi niekto poradiť ako opraviť loose indentation warningy?
×