new horgaszbot[MAX_PLAYERS];new horgasztimer;new RodObject;CMD:fishing ( playerid, params[ ] ){if(!IsPlayerInRangeOfPoint(playerid, 100.0,2044.8909,-149.1644,1.3744 )) return SendClientMessage(playerid,COLOR_WARNING, \"Nem vagy a megadott helyen: /fishinghelp\" );if(horgaszbot[playerid]== -1)return SendClientMessage(playerid,COLOR_WARNING,\"Nincs horgaszbotod vagyél egyet /bolt\");{GameTextForPlayer( playerid, \"~b~~r~~g~Fishing\", 3000, 3);horgasztimer = SetTimerEx(\"horgaszas\", 30000, true, \"u\", playerid);horgaszbot[ playerid ] = 0;TogglePlayerControllable(playerid,0);ApplyAnimation(playerid,\"SWORD\",\"sword_block\",50.0,0,1,0,1,1);}return 1;}CMD:exitfishing(playerid,params[]){if(!IsPlayerInRangeOfPoint(playerid, 100.0,2044.8909,-149.1644,1.3744 )) return SendClientMessage(playerid,COLOR_WARNING, \"Nem Horgászol\" );KillTimer(horgasztimer);TogglePlayerControllable(playerid,1);RemovePlayerAttachedObject(playerid,0);RemovePlayerAttachedObject(playerid,RodObject);ApplyAnimation(playerid, \"CARRY\", \"crry_prtial\", 2.0, 0, 0, 0, 0, 0);horgaszbot[ playerid ] = -1;SendClientMessage(playerid,COLOR_WARNING,\"Kiléptél a horgászásból\");return 1;}public horgaszas (playerid){switch(random(10)){ case 0: ShowPlayerDialog(playerid, 6741, DIALOG_STYLE_MSGBOX,\"Fishing\",\"Kifogtál egy 210 KG-s Tigriscápát Ára: 18000$\",\"OK\",\"\") > 0 && GivePlayerMoney(playerid,18000); case 1: ShowPlayerDialog(playerid, 6742, DIALOG_STYLE_MSGBOX,\"Fishing\",\"Kifogtál egy 250 KG-s Pontyot Ára: 20000$\",\"OK\",\"\") > 0 && GivePlayerMoney(playerid,20000); case 2: ShowPlayerDialog(playerid, 6743, DIALOG_STYLE_MSGBOX,\"Fishing\",\"Kifogtál egy 200 KG-s Fehér Cápát Ára: 21000$\",\"OK\",\"\") > 0 && GivePlayerMoney(playerid,21000);case 3: ShowPlayerDialog(playerid, 6744, DIALOG_STYLE_MSGBOX,\"Fishing\",\"Kifogtál egy 250 KG-s Tigriscápát Ára: 20000$\",\"OK\",\"\") > 0 && GivePlayerMoney(playerid,20000); case 4: ShowPlayerDialog(playerid, 6745, DIALOG_STYLE_MSGBOX,\"Fishing\",\"Kifogtál egy 300 KG-s Fehér Cápát Ára: 25000$\",\"OK\",\"\") > 0 && GivePlayerMoney(playerid,25000); case 5: ShowPlayerDialog(playerid, 6746, DIALOG_STYLE_MSGBOX,\"Fishing\",\"Kifogtál egy 150 KG-s Murénát Ára: 15000$\",\"OK\",\"\") > 0 && GivePlayerMoney(playerid,11000); case 6: ShowPlayerDialog(playerid, 6747, DIALOG_STYLE_MSGBOX,\"Fishing\",\"Kifogtál egy 100 KG-s Tonhalat Ára: 13000$\",\"OK\",\"\") > 0 && GivePlayerMoney(playerid,13000);case 7: ShowPlayerDialog(playerid, 6748, DIALOG_STYLE_MSGBOX,\"Fishing\",\"Kifogtál egy 65 KG-s Tonhalat Ára: 9000$\",\"OK\",\"\") > 0 && GivePlayerMoney(playerid,9000); case 8: ShowPlayerDialog(playerid, 6749, DIALOG_STYLE_MSGBOX,\"Fishing\",\"Kifogtál egy 50 KG-s Murénát Ára: 8000$\",\"OK\",\"\") > 0 && GivePlayerMoney(playerid,8000); case 9: ShowPlayerDialog(playerid, 6750, DIALOG_STYLE_MSGBOX,\"Fishing\",\"Kifogtál egy 40 KG-s Pontyot Ára: 6000$\",\"OK\",\"\") > 0 && GivePlayerMoney(playerid,6000); case 10: ShowPlayerDialog(playerid, 6751, DIALOG_STYLE_MSGBOX,\"Fishing\",\"Kifogtál egy 30 KG-s Harcsát Ára: 5000$\",\"OK\",\"\") > 0 && GivePlayerMoney(playerid,5000);}KillTimer(horgasztimer);TogglePlayerControllable(playerid,1);ApplyAnimation(playerid, \"CARRY\", \"crry_prtial\", 2.0, 0, 0, 0, 0, 0);return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {} if(dialogid ==dialog_bolt) { if(response) { if( listitem==0) { horgaszbot[playerid] = 0 ; RodObject = SetPlayerAttachedObject(playerid, 0,18632,6,0.079376,0.037070,0.007706,181.482910,0.000000,0.000000,1.000000,1.000000,1.000000); GivePlayerMoney(playerid,-1000);SendClientMessage(playerid,-1,\"{00ff00}Vásároltál egy horgászbotot\"); } } } return 0;
SetTimerEx(\"horgaszas\", 30000, true, \"d\", playerid);
SetTimerEx(\"horgaszas\", 30000, true, \"i\", playerid);
horgasztimer = SetTimerEx(\"horgaszas\", 30000, true, \"u\", playerid);
horgasztimer[playerid] = SetTimerEx(\"horgaszas\", 30000, true, \"u\", playerid);
D:\\Programok\\DSPS Szerver\\gamemodes\\Hybryd.pwn(3944) : error 028: invalid subscript (not an array or too many subscripts): \"horgasztimer\"D:\\Programok\\DSPS Szerver\\gamemodes\\Hybryd.pwn(3944) : warning 215: expression has no effectD:\\Programok\\DSPS Szerver\\gamemodes\\Hybryd.pwn(3944) : error 001: expected token: \";\", but found \"]\"D:\\Programok\\DSPS Szerver\\gamemodes\\Hybryd.pwn(3944) : error 029: invalid expression, assumed zeroD:\\Programok\\DSPS Szerver\\gamemodes\\Hybryd.pwn(3944) : fatal error 107: too many error messages on one linep
new horgasztimer[MAX_PLAYERS] // Vagy ha van saját max playersu definiálosd, azt írd be, vagy a slotok számát kézzel, számmal
KillTimer(horgasztimer[playerid]);