Pomoc oko paketica

Započeo G0Bl1N, Januar 03, 2023, 21:55:30 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning):Uz pomoc ovog foruma sam sastavio komandu da napravim paketic(DynamicPickup),napravim paketic, paketic se stvori pokupim ga dobijem nagradu,ali nece da se destroya pickup,pa ako moze neko pomoc
Deo skripte:CMD:paketic(playerid, params[])
{
   if( PlayerInfo[ playerid ][ xAdmin ] < 6 ) return SendErrorMessage( playerid, "Niste u mogucnosti koristiti ovu komandu." );
   if( !AdminDuty[ playerid ] ) return SendErrorMessage( playerid, "Da bi koristili ovu komandu morate biti Admin na duznosti" );
   new Float:x, Float:y, Float:z;
   new rand = random(sizeof(RandomModel));
   GetPlayerPos(playerid, x, y, z);
   Gift[giftCounter] = CreateDynamicPickup(RandomModel[rand][0], 1, x + 3, y + 1, z, GetPlayerVirtualWorld(playerid));
   giftCounter++;
   SendErrorMessage(playerid,col_zeltamno "{FFFFFF}Napravili ste paketic");
   return 1;
}
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log)://
Slika/video ingame problema(obavezno ako je ingame problem)://

public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
   for(new i = 0; i < MAX_GIFTS; i++)
   {
      if(pickupid == Gift && Picked[playerid] == 0)
      {
         switch(random(5))
         {
            case 0:
            {
            new paket1 = (15000);
                GivePlayerMoney(playerid, paket1);
                GameTextForPlayer(playerid, "~g~CESTITAMO, NASAO SI PAKETIC!", 5000, 4);
                SendClientMessage(playerid, -1, "Cestitamo! U paketicu ste dobili $15000!");
                DestroyDynamicPickup(PaketicPickup); //dodano
            }

            case 1:
               {
                new paket2 = (45000);
                GivePlayerMoney(playerid, paket2);
                GameTextForPlayer(playerid, "~g~PAKETIC PRONADJEN!", 5000, 4);
                SendClientMessage(playerid, -1, col_zeltamno "Cestitamo! U paketicu ste dobili $45000!");
                DestroyDynamicPickup(PaketicPickup);
                 }
         }
        }
    }
    return 1;
}

Citat: G0Bl1N poslato Januar 03, 2023, 21:56:23 POSLE PODNE
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
   for(new i = 0; i < MAX_GIFTS; i++)
   {
      if(pickupid == Gift && Picked[playerid] == 0)
      {
         switch(random(5))
         {
            case 0:
            {
            new paket1 = (15000);
                GivePlayerMoney(playerid, paket1);
                GameTextForPlayer(playerid, "~g~CESTITAMO, NASAO SI PAKETIC!", 5000, 4);
                SendClientMessage(playerid, -1, "Cestitamo! U paketicu ste dobili $15000!");
                DestroyDynamicPickup(PaketicPickup); //dodano
            }

            case 1:
               {
                new paket2 = (45000);
                GivePlayerMoney(playerid, paket2);
                GameTextForPlayer(playerid, "~g~PAKETIC PRONADJEN!", 5000, 4);
                SendClientMessage(playerid, -1, col_zeltamno "Cestitamo! U paketicu ste dobili $45000!");
                DestroyDynamicPickup(PaketicPickup);
                 }
         }
        }
    }
    return 1;
}

AKo mu u provjeri stoji pickup kao Gift zasto ti stavljas unistavanje na PaketicPickup kad ga uopste nigdje nema... objasni molim te
Upwork Skills
Back-end:
• PHP Frameworks (Laravel, Symfony,Codeigniter)
• Python/Django
• Node.js

Front-end:
• HTML
• CSS pre-processing (SASS, LESS)
• Javascript (JQuery, Ajax, Vue, Angular, React, etc.)
• Bootstrap

CMS
• Wordpress (Woocommerce)
• Shopify, Magento

pa brate gledao sam ovde po forumu i sastavio sam tako deo po deo,ali me zajebava nece da se destorya paketic

kreiras pickup pod ovom nekom varijablom: Gift[giftCounter], a unistavas pickup pod ovom: PaketicPickup

Citat: G0Bl1N poslato Januar 03, 2023, 22:42:18 POSLE PODNE
pa brate gledao sam ovde po forumu i sastavio sam tako deo po deo,ali me zajebava nece da se destorya paketic
pa ne moze unistiti pickup koji ne postoji, pickup ti se naziva Gift njega moras da unistis
Upwork Skills
Back-end:
• PHP Frameworks (Laravel, Symfony,Codeigniter)
• Python/Django
• Node.js

Front-end:
• HTML
• CSS pre-processing (SASS, LESS)
• Javascript (JQuery, Ajax, Vue, Angular, React, etc.)
• Bootstrap

CMS
• Wordpress (Woocommerce)
• Shopify, Magento

brate kako god da ga nazovem pod DestroyDynamicPickup opet se ne destroya paketic
pomagajte braco molim vas

haha :D :D :D,nije mi do zajebancije zajebavaju me ovi paketici vec mesec dana

CMD:paketic(playerid, params[])
{
   if( PlayerInfo[ playerid ][ xAdmin ] < 6 ) return SendErrorMessage( playerid, "Niste u mogucnosti koristiti ovu komandu." );
   if( !AdminDuty[ playerid ] ) return SendErrorMessage( playerid, "Da bi koristili ovu komandu morate biti Admin na duznosti" );
   new Float:x, Float:y, Float:z;
   new rand = random(sizeof(RandomModel));
   GetPlayerPos(playerid, x, y, z);
   Gift[giftCounter] = CreateDynamicPickup(RandomModel[rand][0], 1, x + 3, y + 1, z, GetPlayerVirtualWorld(playerid));
   giftCounter++;
   SendErrorMessage(playerid,col_zeltamno "{FFFFFF}Napravili ste paketic");
   return 1;
}

public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
   for(new i = 0; i < MAX_GIFTS; i++)
   {
      if(pickupid == Gift && Picked[playerid] == 0)
      {
         switch(random(5))
         {
            case 0:
            {
            new paket1 = (15000);
                GivePlayerMoney(playerid, paket1);
                GameTextForPlayer(playerid, "~g~CESTITAMO, NASAO SI PAKETIC!", 5000, 4);
                SendClientMessage(playerid, -1, "Cestitamo! U paketicu ste dobili $15000!");
                 DestroyDynamicPickup(Gift);
            }

            case 1:
               {
                new paket2 = (45000);
                GivePlayerMoney(playerid, paket2);
                GameTextForPlayer(playerid, "~g~PAKETIC PRONADJEN!", 5000, 4);
                SendClientMessage(playerid, -1, col_zeltamno "Cestitamo! U paketicu ste dobili $45000!");
                 DestroyDynamicPickup(Gift);
                 }
         }
        }
    }
    return 1;
}

#define MAX_GIFTS 500
  #define Konvertujbroj
new giftCounter;
new Gift[MAX_GIFTS];
new Picked[MAX_PLAYERS];
new RandomModel[5][1] =
{
   {19054},
   {19055},
   {19056},
   {19057},
   {19058}
};



Hvala ti brate mojjjjjjj ziv bio 10000000 godina,kako da ti se oduzim brat moj ljubim te u celo ;D ;D ;D ;D ;D ;D ;D