Skocz do zawartości

Bathory

Użytkownik
  • Zawartość

    16
  • Rejestracja

  • Ostatnia wizyta

O Bathory

  • Tytuł
    Obserwator
  • Urodziny 18.09.1996

Informacje profilowe

  • Płeć
    Mężczyzna
  • Miejscowość
    Liberty City
  1. Bathory

    Tworzenie systemu biznesów

    To znaczy nie wiem jaką funkcje musiałbym zapisać żeby po restarcie,biznes był dalej przeznaczony dla właściciela który go kupił.
  2. Bathory

    Podczepianie przyczepy do ciągnika

    Dziękuje Maku
  3. Bathory

    Podczepianie przyczepy do ciągnika

    Zrobiłem na dwa sposoby: Sposób 1: if((newkeys==KEY_FIRE) && (IsPlayerInAnyVehicle(playerid)) && (GetPlayerState(playerid)==PLAYER_STATE_DRIVER)) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 531) { new Float:pX,Float:pY,Float:pZ; GetPlayerPos(playerid,pX,pY,pZ); new Float:vX,Float:vY,Float:vZ; new Found=0; new vid=0; while((vid<MAX_VEHICLES)&&(!Found)) { vid++; GetVehiclePos(vid,vX,vY,vZ); if ((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid))) { Found=1; if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) { if(GetVehicleModel(vid) == 610) { DetachTrailerFromVehicle(GetPlayerVehicleID(playerid)); } AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid)); } } } } } Sposób 2: if((newkeys==KEY_FIRE) && (IsPlayerInAnyVehicle(playerid)) && (GetPlayerState(playerid)==PLAYER_STATE_DRIVER)) { new vid=0; if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 531 && GetVehicleModel(vid) == 610) { new Float:pX,Float:pY,Float:pZ; GetPlayerPos(playerid,pX,pY,pZ); new Float:vX,Float:vY,Float:vZ; new Found=0; while((vid<MAX_VEHICLES)&&(!Found)) { vid++; GetVehiclePos(vid,vX,vY,vZ); if ((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid))) { Found=1; if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) { DetachTrailerFromVehicle(GetPlayerVehicleID(playerid)); } AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid)); } } } } } Niestety żaden z tych sposobów nie działa.
  4. Bathory

    Podczepianie przyczepy do ciągnika

    No właśnie nie wiem jak to zrobić :/
  5. Bathory

    Tworzenie systemu biznesów

    A jest możliwość zrobienia zapisu do Dini?
  6. Siemanko. Posiadam taki kod: if((newkeys==KEY_ACTION)&&(IsPlayerInAnyVehicle(playerid))&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)) { if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 531) { new Float:pX,Float:pY,Float:pZ; GetPlayerPos(playerid,pX,pY,pZ); new Float:vX,Float:vY,Float:vZ; new Found=0; new vid=0; while((vid<MAX_VEHICLES)&&(!Found)) { vid++; GetVehiclePos(vid,vX,vY,vZ); if ((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid))) { Found=1; if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) { DetachTrailerFromVehicle(GetPlayerVehicleID(playerid)); } AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid)); } } } } Narazie mogę podczepić każdy pojazd do Traktora. Moje pytanie brzmi: Co trzeba zmienić abym mógł za pomocą traktora podczepić TYLKO przyczepę o id 610.Bo trochę mi się gra buguję,ponieważ podczepiając przyczepę,podczepiam również inny traktor.
  7. Bathory

    Nie usuwa obiektów

    Czy mógłbyś mi chociaż na jednym krzaku pokazać jak by to miało wyglądać,ponieważ już tego nieogarniam zabardzo. Stworzyłem ten skrypt,żeby nauczyć się robić coś z obiektami,lecz zabardzo mi to nie wyszło. public PonownieTworzyChwasty() { for(new i=0; i<MAX_PLAYERS; i++) { DestroyDynamicObject(Chwast_nr_1); DestroyDynamicObject(Chwast_nr_2); DestroyDynamicObject(Chwast_nr_3); DestroyDynamicObject(Chwast_nr_4); DestroyDynamicObject(Chwast_nr_5); DestroyDynamicObject(Chwast_nr_6); DestroyDynamicObject(Chwast_nr_7); DestroyDynamicObject(Chwast_nr_8); DestroyDynamicObject(Chwast_nr_9); DestroyDynamicObject(Chwast_nr_10); DestroyDynamicObject(Chwast_nr_11); DestroyDynamicObject(Chwast_nr_12); DestroyDynamicObject(Chwast_nr_13); DestroyDynamicObject(Chwast_nr_14); DestroyDynamicObject(Chwast_nr_15); DestroyDynamicObject(Chwast_nr_16); DestroyDynamicObject(Chwast_nr_17); DestroyDynamicObject(Chwast_nr_18); DestroyDynamicObject(Chwast_nr_19); DestroyDynamicObject(Chwast_nr_20); DestroyDynamicObject(Chwast_nr_21); DestroyDynamicObject(Chwast_nr_22); DestroyDynamicObject(Chwast_nr_23); DestroyDynamicObject(Chwast_nr_24); DestroyDynamicObject(Chwast_nr_25); DestroyDynamicObject(Chwast_nr_26); DestroyDynamicObject(Chwast_nr_27); DestroyDynamicObject(Chwast_nr_28); DestroyDynamicObject(Chwast_nr_29); DestroyDynamicObject(Chwast_nr_30); DestroyDynamicObject(Chwast_nr_31); DestroyDynamicObject(Chwast_nr_32); DestroyDynamicObject(Chwast_nr_33); DestroyDynamicObject(Chwast_nr_34); DestroyDynamicObject(Chwast_nr_35); DestroyDynamicObject(Chwast_nr_36); DestroyDynamicObject(Chwast_nr_37); DestroyDynamicObject(Chwast_nr_38); DestroyDynamicObject(Chwast_nr_39); DestroyDynamicObject(Chwast_nr_40); DestroyDynamicObject(Chwast_nr_41); DestroyDynamicObject(Chwast_nr_42); DestroyDynamicObject(Chwast_nr_43); DestroyDynamicObject(Chwast_nr_44); DestroyDynamicObject(Chwast_nr_45); DestroyDynamicObject(Chwast_nr_46); DestroyDynamicObject(Chwast_nr_47); DestroyDynamicObject(Chwast_nr_48); DestroyDynamicObject(Chwast_nr_49); DestroyDynamicObject(Chwast_nr_50); DestroyDynamicObject(Chwast_nr_51); DestroyDynamicObject(Chwast_nr_52); Chwast_nr_1 = CreateDynamicObject(811, -2416.83252, 674.37408, 35.16910, 0.00000, 0.00000, 0.00000); Chwast_nr_2 = CreateDynamicObject(811, -2401.34839, 678.59778, 35.16910, 0.00000, 0.00000, 0.00000); Chwast_nr_3 = CreateDynamicObject(811, -2413.71924, 687.96228, 35.16910, 0.00000, 0.00000, 0.00000); Chwast_nr_4 = CreateDynamicObject(811, -2428.05273, 679.28320, 35.16910, 0.00000, 0.00000, 0.00000); Chwast_nr_5 = CreateDynamicObject(811, -2440.26221, 689.69818, 35.16910, 0.00000, 0.00000, 0.00000); Chwast_nr_6 = CreateDynamicObject(811, -2451.22974, 688.02698, 35.06910, 0.00000, 0.00000, 0.00000); Chwast_nr_7 = CreateDynamicObject(811, -2454.16138, 673.23541, 34.72910, 0.00000, 0.00000, 0.00000); Chwast_nr_8 = CreateDynamicObject(811, -2468.05420, 683.28619, 34.66910, 0.00000, 0.00000, 0.00000); Chwast_nr_9 = CreateDynamicObject(811, -2481.17529, 689.81812, 34.52910, 0.00000, 0.00000, 0.00000); Chwast_nr_10 = CreateDynamicObject(811, -2409.56543, 661.34338, 35.04910, 0.00000, 0.00000, 0.00000); Chwast_nr_11 = CreateDynamicObject(811, -2423.61792, 665.24109, 35.04910, 0.00000, 0.00000, 0.00000); Chwast_nr_12 = CreateDynamicObject(811, -2440.03247, 663.95892, 34.80910, 0.00000, 0.00000, 0.00000); Chwast_nr_13 = CreateDynamicObject(811, -2453.38696, 655.94061, 34.28910, 0.00000, 0.00000, 0.00000); Chwast_nr_14 = CreateDynamicObject(811, -2464.76489, 655.25763, 33.78910, 0.00000, 0.00000, 0.00000); Chwast_nr_15 = CreateDynamicObject(811, -2469.11060, 664.13068, 33.78910, 0.00000, 0.00000, 0.00000); Chwast_nr_16 = CreateDynamicObject(811, -2479.11548, 670.08008, 33.52910, 0.00000, 0.00000, 0.00000); Chwast_nr_17 = CreateDynamicObject(811, -2493.00952, 670.82788, 31.94910, 0.00000, 0.00000, 0.00000); Chwast_nr_18 = CreateDynamicObject(811, -2498.72729, 677.93591, 31.36910, 0.00000, -12.00000, 0.00000); Chwast_nr_19 = CreateDynamicObject(811, -2502.77661, 690.68048, 30.82910, 0.00000, -12.00000, 0.00000); Chwast_nr_20 = CreateDynamicObject(811, -2514.39966, 679.15741, 28.36910, 0.00000, -12.00000, 0.00000); Chwast_nr_21 = CreateDynamicObject(811, -2476.95142, 655.36609, 32.96910, 0.00000, 0.00000, 0.00000); Chwast_nr_22 = CreateDynamicObject(811, -2487.62256, 648.37128, 31.46910, 0.00000, 0.00000, 0.00000); Chwast_nr_23 = CreateDynamicObject(811, -2499.11035, 660.76501, 30.80910, 0.00000, -12.00000, 0.00000); Chwast_nr_24 = CreateDynamicObject(811, -2510.85986, 649.99823, 28.94910, 0.00000, -12.00000, 0.00000); Chwast_nr_25 = CreateDynamicObject(811, -2406.48901, 649.44391, 34.78910, 0.00000, 0.00000, 0.00000); Chwast_nr_26 = CreateDynamicObject(811, -2417.36987, 646.99200, 34.56910, 0.00000, 0.00000, 0.00000); Chwast_nr_27 = CreateDynamicObject(811, -2425.44556, 653.50085, 34.78910, 0.00000, 0.00000, 0.00000); Chwast_nr_28 = CreateDynamicObject(811, -2435.21606, 642.44482, 33.90910, 0.00000, 0.00000, 0.00000); Chwast_nr_29 = CreateDynamicObject(811, -2447.50000, 644.04077, 33.68910, 0.00000, 0.00000, 0.00000); Chwast_nr_30 = CreateDynamicObject(811, -2442.60815, 634.68433, 33.08910, 0.00000, 0.00000, 0.00000); Chwast_nr_31 = CreateDynamicObject(811, -2461.34351, 646.21918, 33.26910, 0.00000, 0.00000, 0.00000); Chwast_nr_32 = CreateDynamicObject(811, -2477.95483, 636.27319, 31.34910, 0.00000, 0.00000, 0.00000); Chwast_nr_33 = CreateDynamicObject(811, -2500.06201, 632.91272, 28.88910, 0.00000, 0.00000, 0.00000); Chwast_nr_34 = CreateDynamicObject(811, -2511.12158, 630.06818, 27.58910, 0.00000, 0.00000, 0.00000); Chwast_nr_35 = CreateDynamicObject(811, -2423.91895, 633.35358, 33.44910, 0.00000, 0.00000, 0.00000); Chwast_nr_36 = CreateDynamicObject(811, -2404.25464, 630.98822, 33.98910, 0.00000, 0.00000, 0.00000); Chwast_nr_37 = CreateDynamicObject(811, -2417.18066, 619.26068, 31.66910, 0.00000, 0.00000, 0.00000); Chwast_nr_38 = CreateDynamicObject(811, -2435.46045, 622.08508, 31.60910, 0.00000, 0.00000, 0.00000); Chwast_nr_39 = CreateDynamicObject(811, -2449.15771, 613.62518, 29.50910, 0.00000, 0.00000, 0.00000); Chwast_nr_40 = CreateDynamicObject(811, -2461.97461, 628.98389, 31.34910, 0.00000, 0.00000, 0.00000); Chwast_nr_41 = CreateDynamicObject(811, -2479.17651, 623.52942, 29.18910, 0.00000, 0.00000, 0.00000); Chwast_nr_42 = CreateDynamicObject(811, -2495.51367, 615.80719, 26.56910, 0.00000, 0.00000, 0.00000); Chwast_nr_43 = CreateDynamicObject(811, -2513.03027, 616.70502, 26.28910, 0.00000, 0.00000, 0.00000); Chwast_nr_44 = CreateDynamicObject(811, -2513.15674, 603.61792, 22.36910, 0.00000, 0.00000, 0.00000); Chwast_nr_45 = CreateDynamicObject(811, -2496.06738, 601.14001, 22.68910, 0.00000, 0.00000, 0.00000); Chwast_nr_46 = CreateDynamicObject(811, -2478.82666, 612.09778, 26.98910, 0.00000, 0.00000, 0.00000); Chwast_nr_47 = CreateDynamicObject(811, -2409.30835, 601.56891, 28.72910, 0.00000, 0.00000, 0.00000); Chwast_nr_48 = CreateDynamicObject(811, -2433.92407, 601.51892, 28.12910, 0.00000, 0.00000, 0.00000); Chwast_nr_49 = CreateDynamicObject(811, -2421.51245, 595.93457, 27.50910, 0.00000, 0.00000, 0.00000); Chwast_nr_50 = CreateDynamicObject(811, -2424.84009, 610.76910, 30.10910, 0.00000, 0.00000, 0.00000); Chwast_nr_51 = CreateDynamicObject(811, -2457.35327, 601.99402, 26.52910, 0.00000, 0.00000, 0.00000); Chwast_nr_52 = CreateDynamicObject(811, -2467.53223, 592.93842, 23.28910, 0.00000, 0.00000, 0.00000); } return (true); } public KosChwasty() { for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerInVehicle(i, Kosiarka_nr_1) || IsPlayerInVehicle(i, Kosiarka_nr_2) || IsPlayerInVehicle(i, Kosiarka_nr_3) || IsPlayerInVehicle(i, Kosiarka_nr_4) || IsPlayerInVehicle(i, Kosiarka_nr_5) || IsPlayerInVehicle(i, Kosiarka_nr_6) || IsPlayerInVehicle(i, Kosiarka_nr_7)) { if(IsPlayerInRangeOfPoint(i, 1.5, -2416.83252, 674.37408, 35.16910)) { DestroyDynamicObject(Chwast_nr_1); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2401.34839, 678.59778, 35.16910)) { DestroyDynamicObject(Chwast_nr_2); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2413.71924, 687.96228, 35.16910)) { DestroyDynamicObject(Chwast_nr_3); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2428.05273, 679.28320, 35.16910)) { DestroyDynamicObject(Chwast_nr_4); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2440.26221, 689.69818, 35.16910)) { DestroyDynamicObject(Chwast_nr_5); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2451.22974, 688.02698, 35.06910)) { DestroyDynamicObject(Chwast_nr_6); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2454.16138, 673.23541, 34.72910)) { DestroyDynamicObject(Chwast_nr_7); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2468.05420, 683.28619, 34.66910)) { DestroyDynamicObject(Chwast_nr_8); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2481.17529, 689.81812, 34.52910)) { DestroyDynamicObject(Chwast_nr_9); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2409.56543, 661.34338, 35.04910)) { DestroyDynamicObject(Chwast_nr_10); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2423.61792, 665.24109, 35.04910)) { DestroyDynamicObject(Chwast_nr_11); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2440.03247, 663.95892, 34.80910)) { DestroyDynamicObject(Chwast_nr_12); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2453.38696, 655.94061, 34.28910)) { DestroyDynamicObject(Chwast_nr_13); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2464.76489, 655.25763, 33.78910)) { DestroyDynamicObject(Chwast_nr_14); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2469.11060, 664.13068, 33.78910)) { DestroyDynamicObject(Chwast_nr_15); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2479.11548, 670.08008, 33.52910)) { DestroyDynamicObject(Chwast_nr_16); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2493.00952, 670.82788, 31.94910)) { DestroyDynamicObject(Chwast_nr_17); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2498.72729, 677.93591, 31.36910)) { DestroyDynamicObject(Chwast_nr_18); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2502.77661, 690.68048, 30.82910)) { DestroyDynamicObject(Chwast_nr_19); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2514.39966, 679.15741, 28.36910)) { DestroyDynamicObject(Chwast_nr_20); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2476.95142, 655.36609, 32.96910)) { DestroyDynamicObject(Chwast_nr_21); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2487.62256, 648.37128, 31.46910)) { DestroyDynamicObject(Chwast_nr_22); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2499.11035, 660.76501, 31.36910)) { DestroyDynamicObject(Chwast_nr_23); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2510.85986, 649.99823, 28.94910)) { DestroyDynamicObject(Chwast_nr_24); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2406.48901, 649.44391, 34.78910)) { DestroyDynamicObject(Chwast_nr_25); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2417.36987, 646.99200, 34.56910)) { DestroyDynamicObject(Chwast_nr_26); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2425.44556, 653.50085, 34.78910)) { DestroyDynamicObject(Chwast_nr_27); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2435.21606, 642.44482, 33.90910)) { DestroyDynamicObject(Chwast_nr_28); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2447.50000, 644.04077, 33.90910)) { DestroyDynamicObject(Chwast_nr_29); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2442.60815, 634.68433, 33.08910)) { DestroyDynamicObject(Chwast_nr_30); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2461.34351, 646.21918, 33.26910)) { DestroyDynamicObject(Chwast_nr_31); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2477.95483, 636.27319, 31.34910)) { DestroyDynamicObject(Chwast_nr_32); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2500.06201, 632.91272, 28.88910)) { DestroyDynamicObject(Chwast_nr_33); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2511.12158, 630.06818, 27.58910)) { DestroyDynamicObject(Chwast_nr_34); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2423.91895, 633.35358, 33.44910)) { DestroyDynamicObject(Chwast_nr_35); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2404.25464, 630.98822, 33.98910)) { DestroyDynamicObject(Chwast_nr_36); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2417.18066, 619.26068, 31.66910)) { DestroyDynamicObject(Chwast_nr_37); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2435.46045, 622.08508, 31.60910)) { DestroyDynamicObject(Chwast_nr_38); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2449.15771, 613.62518, 29.50910)) { DestroyDynamicObject(Chwast_nr_39); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2461.97461, 628.98389, 31.34910)) { DestroyDynamicObject(Chwast_nr_40); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2479.17651, 623.52942, 29.18910)) { DestroyDynamicObject(Chwast_nr_41); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2495.51367, 615.80719, 26.56910)) { DestroyDynamicObject(Chwast_nr_42); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2513.03027, 616.70502, 26.28910)) { DestroyDynamicObject(Chwast_nr_43); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2513.15674, 603.61792, 22.36910)) { DestroyDynamicObject(Chwast_nr_44); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2496.06738, 601.14001, 22.68910)) { DestroyDynamicObject(Chwast_nr_45); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2478.82666, 612.09778, 26.98910)) { DestroyDynamicObject(Chwast_nr_46); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2409.30835, 601.56891, 28.72910)) { DestroyDynamicObject(Chwast_nr_47); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2433.92407, 601.51892, 28.12910)) { DestroyDynamicObject(Chwast_nr_48); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2421.51245, 595.93457, 27.50910)) { DestroyDynamicObject(Chwast_nr_49); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2424.84009, 610.76910, 30.10910)) { DestroyDynamicObject(Chwast_nr_50); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2457.35327, 601.99402, 26.52910)) { DestroyDynamicObject(Chwast_nr_51); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2467.53223, 592.93842, 23.28910)) { DestroyDynamicObject(Chwast_nr_52); GivePlayerMoney(i, 25); } } } return (true); }
  8. Bathory

    Nie usuwa obiektów

    Tylko z twoim rozwiązaniem jest problem. Jak dodam kolejnego krzaka,to pierwszego da się skosić lecz drugiego już nie bo pierwszy: if(used == 1) // kończymy kod, jak już ktoś skosił chwasta return 1; blokuje już wszystko.
  9. Bathory

    Nie usuwa obiektów

    Dobrze wiedzieć.A teraz moja ostatnia prośba chciałbym aby po skoszeniu nie dawało cały czas 25$. Bo jak się skosi i zostanie się w jednym miejscu to kasa się cały czas nabija. Podobno tak jak pisał MatriX12. trzeba użyć pVara lecz nie wiem jak go wstawić do tych funckji bo ani razy nie miałem z nimi doczynienia.
  10. Bathory

    Nie usuwa obiektów

    Dzięki serdeczne działa dla wszystkich mam teraz zrobione to w ten sposób: GameModeInit: SetTimer("PonownieTworzyChwasty", 30000, true); SetTimer("KosChwasty", 500, true); krzak = CreateDynamicObject(811,-2307.6008,-70.3268,35.1641, 0.00000, 0.00000, 0.00000); i na dole: forward KosChwasty(); public KosChwasty() { for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerInVehicle(i, Kosiarka_nr_1) || IsPlayerInVehicle(i, Kosiarka_nr_2) || IsPlayerInVehicle(i, Kosiarka_nr_3) || IsPlayerInVehicle(i, Kosiarka_nr_4) || IsPlayerInVehicle(i, Kosiarka_nr_5) || IsPlayerInVehicle(i, Kosiarka_nr_6) || IsPlayerInVehicle(i, Kosiarka_nr_7)) { if(IsPlayerInRangeOfPoint(i, 1.5, -2307.6008,-70.3268,35.1641)) { krzak = DestroyDynamicObject(krzak); GivePlayerMoney(i, 25); } } } return (true); } forward PonownieTworzyChwasty(); public PonownieTworzyChwasty() { DestroyDynamicObject(krzak); krzak = CreateDynamicObject(811, -2307.6008,-70.3268,35.1641, 0.00000, 0.00000, 0.00000); return (true); } Obiekt jak go skoszę usuwa się.Fajnie,u brata też go już nie ma.Teraz jest problem że po 30 sekundach powinien się pojawić nowy krzak. Lecz problem jest taki że jak się ruszę to dopiero się pojawia jak stoję po 30 sekundach nic się nie dzieję dopiero w ruchu się pokazuje. Wiesz moze co mozebyć powodem czegoś takiego?
  11. Bathory

    Nie usuwa obiektów

    Tzn teraz cały skrypt wygląda tak o: GamemodeInit: SetTimer("PonownieTworzyChwasty", 550000, true); SetTimer("KosChwasty", 500, true); for(new i=0; i<MAX_PLAYERS; i++) { PlayerInfo[i][Chwast][0] = CreateDynamicObject(811, -2416.83252, 674.37408, 35.16910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][1] = CreateDynamicObject(811, -2401.34839, 678.59778, 35.16910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][2] = CreateDynamicObject(811, -2413.71924, 687.96228, 35.16910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][3] = CreateDynamicObject(811, -2428.05273, 679.28320, 35.16910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][4] = CreateDynamicObject(811, -2440.26221, 689.69818, 35.16910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][5] = CreateDynamicObject(811, -2451.22974, 688.02698, 35.06910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][6] = CreateDynamicObject(811, -2454.16138, 673.23541, 34.72910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][7] = CreateDynamicObject(811, -2468.05420, 683.28619, 34.66910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][8] = CreateDynamicObject(811, -2481.17529, 689.81812, 34.52910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][9] = CreateDynamicObject(811, -2409.56543, 661.34338, 35.04910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][10] = CreateDynamicObject(811, -2423.61792, 665.24109, 35.04910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][11] = CreateDynamicObject(811, -2440.03247, 663.95892, 34.80910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][12] = CreateDynamicObject(811, -2453.38696, 655.94061, 34.28910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][13] = CreateDynamicObject(811, -2464.76489, 655.25763, 33.78910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][14] = CreateDynamicObject(811, -2469.11060, 664.13068, 33.78910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][15] = CreateDynamicObject(811, -2479.11548, 670.08008, 33.52910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][16] = CreateDynamicObject(811, -2493.00952, 670.82788, 31.94910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][17] = CreateDynamicObject(811, -2498.72729, 677.93591, 31.36910, 0.00000, -12.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][18] = CreateDynamicObject(811, -2502.77661, 690.68048, 30.82910, 0.00000, -12.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][19] = CreateDynamicObject(811, -2514.39966, 679.15741, 28.36910, 0.00000, -12.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][20] = CreateDynamicObject(811, -2476.95142, 655.36609, 32.96910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][21] = CreateDynamicObject(811, -2487.62256, 648.37128, 31.46910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][22] = CreateDynamicObject(811, -2499.11035, 660.76501, 30.80910, 0.00000, -12.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][23] = CreateDynamicObject(811, -2510.85986, 649.99823, 28.94910, 0.00000, -12.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][24] = CreateDynamicObject(811, -2406.48901, 649.44391, 34.78910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][25] = CreateDynamicObject(811, -2417.36987, 646.99200, 34.56910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][26] = CreateDynamicObject(811, -2425.44556, 653.50085, 34.78910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][27] = CreateDynamicObject(811, -2435.21606, 642.44482, 33.90910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][28] = CreateDynamicObject(811, -2447.50000, 644.04077, 33.68910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][29] = CreateDynamicObject(811, -2442.60815, 634.68433, 33.08910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][30] = CreateDynamicObject(811, -2461.34351, 646.21918, 33.26910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][31] = CreateDynamicObject(811, -2477.95483, 636.27319, 31.34910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][32] = CreateDynamicObject(811, -2500.06201, 632.91272, 28.88910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][33] = CreateDynamicObject(811, -2511.12158, 630.06818, 27.58910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][34] = CreateDynamicObject(811, -2423.91895, 633.35358, 33.44910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][35] = CreateDynamicObject(811, -2404.25464, 630.98822, 33.98910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][36] = CreateDynamicObject(811, -2417.18066, 619.26068, 31.66910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][37] = CreateDynamicObject(811, -2435.46045, 622.08508, 31.60910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][38] = CreateDynamicObject(811, -2449.15771, 613.62518, 29.50910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][39] = CreateDynamicObject(811, -2461.97461, 628.98389, 31.34910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][40] = CreateDynamicObject(811, -2479.17651, 623.52942, 29.18910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][41] = CreateDynamicObject(811, -2495.51367, 615.80719, 26.56910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][42] = CreateDynamicObject(811, -2513.03027, 616.70502, 26.28910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][43] = CreateDynamicObject(811, -2513.15674, 603.61792, 22.36910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][44] = CreateDynamicObject(811, -2496.06738, 601.14001, 22.68910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][45] = CreateDynamicObject(811, -2478.82666, 612.09778, 26.98910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][46] = CreateDynamicObject(811, -2409.30835, 601.56891, 28.72910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][47] = CreateDynamicObject(811, -2433.92407, 601.51892, 28.12910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][48] = CreateDynamicObject(811, -2421.51245, 595.93457, 27.50910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][49] = CreateDynamicObject(811, -2424.84009, 610.76910, 30.10910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][50] = CreateDynamicObject(811, -2457.35327, 601.99402, 26.52910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][51] = CreateDynamicObject(811, -2467.53223, 592.93842, 23.28910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); } i na samym dole: public PonownieTworzyChwasty() { for(new i=0; i<MAX_PLAYERS; i++) { DestroyDynamicObject(PlayerInfo[i][Chwast][0]); DestroyDynamicObject(PlayerInfo[i][Chwast][1]); DestroyDynamicObject(PlayerInfo[i][Chwast][2]); DestroyDynamicObject(PlayerInfo[i][Chwast][3]); DestroyDynamicObject(PlayerInfo[i][Chwast][4]); DestroyDynamicObject(PlayerInfo[i][Chwast][5]); DestroyDynamicObject(PlayerInfo[i][Chwast][6]); DestroyDynamicObject(PlayerInfo[i][Chwast][7]); DestroyDynamicObject(PlayerInfo[i][Chwast][8]); DestroyDynamicObject(PlayerInfo[i][Chwast][9]); DestroyDynamicObject(PlayerInfo[i][Chwast][10]); DestroyDynamicObject(PlayerInfo[i][Chwast][11]); DestroyDynamicObject(PlayerInfo[i][Chwast][12]); DestroyDynamicObject(PlayerInfo[i][Chwast][13]); DestroyDynamicObject(PlayerInfo[i][Chwast][14]); DestroyDynamicObject(PlayerInfo[i][Chwast][15]); DestroyDynamicObject(PlayerInfo[i][Chwast][16]); DestroyDynamicObject(PlayerInfo[i][Chwast][17]); DestroyDynamicObject(PlayerInfo[i][Chwast][18]); DestroyDynamicObject(PlayerInfo[i][Chwast][19]); DestroyDynamicObject(PlayerInfo[i][Chwast][20]); DestroyDynamicObject(PlayerInfo[i][Chwast][21]); DestroyDynamicObject(PlayerInfo[i][Chwast][22]); DestroyDynamicObject(PlayerInfo[i][Chwast][23]); DestroyDynamicObject(PlayerInfo[i][Chwast][24]); DestroyDynamicObject(PlayerInfo[i][Chwast][25]); DestroyDynamicObject(PlayerInfo[i][Chwast][26]); DestroyDynamicObject(PlayerInfo[i][Chwast][27]); DestroyDynamicObject(PlayerInfo[i][Chwast][28]); DestroyDynamicObject(PlayerInfo[i][Chwast][29]); DestroyDynamicObject(PlayerInfo[i][Chwast][30]); DestroyDynamicObject(PlayerInfo[i][Chwast][31]); DestroyDynamicObject(PlayerInfo[i][Chwast][32]); DestroyDynamicObject(PlayerInfo[i][Chwast][33]); DestroyDynamicObject(PlayerInfo[i][Chwast][34]); DestroyDynamicObject(PlayerInfo[i][Chwast][35]); DestroyDynamicObject(PlayerInfo[i][Chwast][36]); DestroyDynamicObject(PlayerInfo[i][Chwast][37]); DestroyDynamicObject(PlayerInfo[i][Chwast][38]); DestroyDynamicObject(PlayerInfo[i][Chwast][39]); DestroyDynamicObject(PlayerInfo[i][Chwast][40]); DestroyDynamicObject(PlayerInfo[i][Chwast][41]); DestroyDynamicObject(PlayerInfo[i][Chwast][42]); DestroyDynamicObject(PlayerInfo[i][Chwast][43]); DestroyDynamicObject(PlayerInfo[i][Chwast][44]); DestroyDynamicObject(PlayerInfo[i][Chwast][45]); DestroyDynamicObject(PlayerInfo[i][Chwast][46]); DestroyDynamicObject(PlayerInfo[i][Chwast][47]); DestroyDynamicObject(PlayerInfo[i][Chwast][48]); DestroyDynamicObject(PlayerInfo[i][Chwast][49]); DestroyDynamicObject(PlayerInfo[i][Chwast][50]); DestroyDynamicObject(PlayerInfo[i][Chwast][51]); PlayerInfo[i][Chwast][0] = CreateDynamicObject(811, -2416.83252, 674.37408, 35.16910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][1] = CreateDynamicObject(811, -2401.34839, 678.59778, 35.16910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][2] = CreateDynamicObject(811, -2413.71924, 687.96228, 35.16910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][3] = CreateDynamicObject(811, -2428.05273, 679.28320, 35.16910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][4] = CreateDynamicObject(811, -2440.26221, 689.69818, 35.16910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][5] = CreateDynamicObject(811, -2451.22974, 688.02698, 35.06910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][6] = CreateDynamicObject(811, -2454.16138, 673.23541, 34.72910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][7] = CreateDynamicObject(811, -2468.05420, 683.28619, 34.66910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][8] = CreateDynamicObject(811, -2481.17529, 689.81812, 34.52910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][9] = CreateDynamicObject(811, -2409.56543, 661.34338, 35.04910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][10] = CreateDynamicObject(811, -2423.61792, 665.24109, 35.04910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][11] = CreateDynamicObject(811, -2440.03247, 663.95892, 34.80910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][12] = CreateDynamicObject(811, -2453.38696, 655.94061, 34.28910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][13] = CreateDynamicObject(811, -2464.76489, 655.25763, 33.78910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][14] = CreateDynamicObject(811, -2469.11060, 664.13068, 33.78910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][15] = CreateDynamicObject(811, -2479.11548, 670.08008, 33.52910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][16] = CreateDynamicObject(811, -2493.00952, 670.82788, 31.94910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][17] = CreateDynamicObject(811, -2498.72729, 677.93591, 31.36910, 0.00000, -12.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][18] = CreateDynamicObject(811, -2502.77661, 690.68048, 30.82910, 0.00000, -12.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][19] = CreateDynamicObject(811, -2514.39966, 679.15741, 28.36910, 0.00000, -12.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][20] = CreateDynamicObject(811, -2476.95142, 655.36609, 32.96910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][21] = CreateDynamicObject(811, -2487.62256, 648.37128, 31.46910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][22] = CreateDynamicObject(811, -2499.11035, 660.76501, 30.80910, 0.00000, -12.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][23] = CreateDynamicObject(811, -2510.85986, 649.99823, 28.94910, 0.00000, -12.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][24] = CreateDynamicObject(811, -2406.48901, 649.44391, 34.78910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][25] = CreateDynamicObject(811, -2417.36987, 646.99200, 34.56910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][26] = CreateDynamicObject(811, -2425.44556, 653.50085, 34.78910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][27] = CreateDynamicObject(811, -2435.21606, 642.44482, 33.90910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][28] = CreateDynamicObject(811, -2447.50000, 644.04077, 33.68910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][29] = CreateDynamicObject(811, -2442.60815, 634.68433, 33.08910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][30] = CreateDynamicObject(811, -2461.34351, 646.21918, 33.26910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][31] = CreateDynamicObject(811, -2477.95483, 636.27319, 31.34910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][32] = CreateDynamicObject(811, -2500.06201, 632.91272, 28.88910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][33] = CreateDynamicObject(811, -2511.12158, 630.06818, 27.58910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][34] = CreateDynamicObject(811, -2423.91895, 633.35358, 33.44910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][35] = CreateDynamicObject(811, -2404.25464, 630.98822, 33.98910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][36] = CreateDynamicObject(811, -2417.18066, 619.26068, 31.66910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][37] = CreateDynamicObject(811, -2435.46045, 622.08508, 31.60910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][38] = CreateDynamicObject(811, -2449.15771, 613.62518, 29.50910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][39] = CreateDynamicObject(811, -2461.97461, 628.98389, 31.34910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][40] = CreateDynamicObject(811, -2479.17651, 623.52942, 29.18910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][41] = CreateDynamicObject(811, -2495.51367, 615.80719, 26.56910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][42] = CreateDynamicObject(811, -2513.03027, 616.70502, 26.28910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][43] = CreateDynamicObject(811, -2513.15674, 603.61792, 22.36910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][44] = CreateDynamicObject(811, -2496.06738, 601.14001, 22.68910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][45] = CreateDynamicObject(811, -2478.82666, 612.09778, 26.98910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][46] = CreateDynamicObject(811, -2409.30835, 601.56891, 28.72910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][47] = CreateDynamicObject(811, -2433.92407, 601.51892, 28.12910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][48] = CreateDynamicObject(811, -2421.51245, 595.93457, 27.50910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][49] = CreateDynamicObject(811, -2424.84009, 610.76910, 30.10910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][50] = CreateDynamicObject(811, -2457.35327, 601.99402, 26.52910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][51] = CreateDynamicObject(811, -2467.53223, 592.93842, 23.28910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); } return (true); } public KosChwasty() { for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerInVehicle(i, Kosiarka_nr_1) || IsPlayerInVehicle(i, Kosiarka_nr_2) || IsPlayerInVehicle(i, Kosiarka_nr_3) || IsPlayerInVehicle(i, Kosiarka_nr_4) || IsPlayerInVehicle(i, Kosiarka_nr_5) || IsPlayerInVehicle(i, Kosiarka_nr_6) || IsPlayerInVehicle(i, Kosiarka_nr_7)) { if(IsPlayerInRangeOfPoint(i, 1.5, -2416.83252, 674.37408, 35.16910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][0]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2401.34839, 678.59778, 35.16910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][1]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2413.71924, 687.96228, 35.16910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][2]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2428.05273, 679.28320, 35.16910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][3]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2440.26221, 689.69818, 35.16910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][4]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2451.22974, 688.02698, 35.06910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][5]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2454.16138, 673.23541, 34.72910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][6]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2468.05420, 683.28619, 34.66910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][7]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2481.17529, 689.81812, 34.52910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][8]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2409.56543, 661.34338, 35.04910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][9]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2423.61792, 665.24109, 35.04910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][10]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2440.03247, 663.95892, 34.80910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][11]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2453.38696, 655.94061, 34.28910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][12]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2464.76489, 655.25763, 33.78910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][13]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2469.11060, 664.13068, 33.78910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][14]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2479.11548, 670.08008, 33.52910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][15]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2493.00952, 670.82788, 31.94910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][16]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2498.72729, 677.93591, 31.36910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][17]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2502.77661, 690.68048, 30.82910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][18]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2514.39966, 679.15741, 28.36910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][19]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2476.95142, 655.36609, 32.96910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][20]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2487.62256, 648.37128, 31.46910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][21]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2499.11035, 660.76501, 31.36910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][22]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2510.85986, 649.99823, 28.94910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][23]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2406.48901, 649.44391, 34.78910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][24]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2417.36987, 646.99200, 34.56910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][25]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2425.44556, 653.50085, 34.78910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][26]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2435.21606, 642.44482, 33.90910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][27]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2447.50000, 644.04077, 33.90910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][28]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2442.60815, 634.68433, 33.08910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][29]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2461.34351, 646.21918, 33.26910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][30]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2477.95483, 636.27319, 31.34910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][31]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2500.06201, 632.91272, 28.88910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][32]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2511.12158, 630.06818, 27.58910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][33]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2423.91895, 633.35358, 33.44910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][34]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2404.25464, 630.98822, 33.98910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][35]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2417.18066, 619.26068, 31.66910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][36]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2435.46045, 622.08508, 31.60910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][37]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2449.15771, 613.62518, 29.50910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][38]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2461.97461, 628.98389, 31.34910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][39]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2479.17651, 623.52942, 29.18910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][40]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2495.51367, 615.80719, 26.56910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][41]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2513.03027, 616.70502, 26.28910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][42]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2513.15674, 603.61792, 22.36910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][43]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2496.06738, 601.14001, 22.68910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][44]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2478.82666, 612.09778, 26.98910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][45]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2409.30835, 601.56891, 28.72910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][46]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2433.92407, 601.51892, 28.12910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][47]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2421.51245, 595.93457, 27.50910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][48]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2424.84009, 610.76910, 30.10910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][49]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2457.35327, 601.99402, 26.52910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][50]); GivePlayerMoney(i, 25); } if(IsPlayerInRangeOfPoint(i, 1.5, -2467.53223, 592.93842, 23.28910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][51]); GivePlayerMoney(i, 25); } } } return (true); } Lecz KaZ nie wiem co mam w tym skrypcie zmienić żeby naprawić,błąd że jak ja kosze to druga osoba dalej ma chwasty które ja skosiłem.
  12. Bathory

    Nie usuwa obiektów

    To nic nie daje. Coś musi być nie tak w: public KosChwasty() { for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerInVehicle(i, 572)) { if(IsPlayerInRangeOfPoint(i, 2.0, -2416.83252, 674.37408, 35.16910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][0]); GivePlayerMoney(i, 10); } if(IsPlayerInRangeOfPoint(i, 2.0, -2401.34839, 678.59778, 35.16910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][1]); GivePlayerMoney(i, 10); } } } return (true); } Bo tak to działa normalnie,tylko jak np dodam to na swój serwer RP to już nie będzie RP,bo każdy będzie miał tyle samo chwastów do skoszenia.
  13. Bathory

    Nie usuwa obiektów

    Ok,dziękuje I mam teraz ostatni problem.Sprawdziłem z bratem czy działa cały ten skrypt.Wyszło pięknie,lecz zastanawiam się jaki może być błąd tego że jak ja kosze chwasty to u niego one dalej są - nie znikają. Ja skosze obydwa chwasty a u niego dalej one są i naodwrót. Doradziłby mi ktoś jaki może być tego problem?
  14. Bathory

    Nie usuwa obiektów

    Poradziłem sobie. MatriX12 trzeba było: stock KosChwasty() zamienic na public KosChwasty() i dodać timer. Lecz teraz mam kolejny problem ponieważ jak skoszę roślinę,dostanę 10$ i dalej będę stał na miejscu rośliny to dalej będą przybywać mi pieniądze. Co musiałbym dodać do tego: public KosChwasty() { for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerInVehicle(i, 572)) { if(IsPlayerInRangeOfPoint(i, 2.0, -2416.83252, 674.37408, 35.16910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][0]); GivePlayerMoney(i, 10); } if(IsPlayerInRangeOfPoint(i, 2.0, -2401.34839, 678.59778, 35.16910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][1]); GivePlayerMoney(i, 10); } } } return (true); } aby po skoszeniu obiektu,będąc w tej samej pozycji nie otrzymywać kolejnych 10$.
  15. Bathory

    Nie usuwa obiektów

    Siemanko. Mam takie funckje: Na górze mapy: enum wKosiarka { Chwast[2] } new PlayerInfo[MAX_PLAYERS][wKosiarka]; W GameModeInit: TworzChwasty(); KosChwasty(); i na dole mapy: stock KosChwasty() { for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerInVehicle(i, 572)) { if(IsPlayerInRangeOfPoint(i, 2.0, -2416.83252, 674.37408, 35.16910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][0]); } if(IsPlayerInRangeOfPoint(i, 2.0, -2401.34839, 678.59778, 35.16910)) { DestroyDynamicObject(PlayerInfo[i][Chwast][1]); } } } return (true); } stock TworzChwasty() { for(new i=0; i<MAX_PLAYERS; i++) { PlayerInfo[i][Chwast][0] = CreateDynamicObject(811, -2416.83252, 674.37408, 35.16910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); PlayerInfo[i][Chwast][1] = CreateDynamicObject(811, -2401.34839, 678.59778, 35.16910, 0.00000, 0.00000, 0.00000, -1, -1, i, 1000.0); } return (true); } Lecz problem jest taki że jak najeżdzam na obiekt kosiarką to obiekt się nie usuwa.Nie wiem jaka jest przyczyna. Mam nadzieję ze ktoś mi pomoże Dziękuje
×