CreateDynamicPickUp help
#1

OnGameModeInit:
Код:
pickup19 = CreateDynamicPickup(1274, 3, 363.5612,-2060.9463,15.3972, 0);
bagwitmoney = CreateDynamicPickup(1550, 3, 972.4592, -2356.1089, 91.6249, 0);
OnPlayerPickupDynamicPickUp:
Код:
if(pickupid == pickup19)
	{
		GivePlayerMoney(playerid, 2500);
		DestroyDynamicPickup(pickup19);
	}
	if(pickupid == bagwitmoney)
	{
		GivePlayerMoney(playerid, 150000);
		DestroyDynamicPickup(bagwitmoney);
	}
It doesn't work. I can't see the pickup. How can i make it when player pickup PickUp to give him money and to destroy the pickup?
Reply
#2

On the top of the script
PHP код:
new pickup19;
new 
bagwitmoney
Rep if i helped you
Reply
#3

Quote:
Originally Posted by nezo2001
Посмотреть сообщение
On the top of the script
PHP код:
new pickup19;
new 
bagwitmoney
Rep if i helped you
ofc. I have these variables, if i don't how can i compile the whole code.
Reply
#4

Ooh sorry try this
PHP код:
if(pickupid == pickup19)
    {
        
GivePlayerMoney(playerid2500);
        
DestroyDynamicPickup(pickup19);
    }
    else if(
pickupid == bagwitmoney)
    {
        
GivePlayerMoney(playerid150000);
        
DestroyDynamicPickup(bagwitmoney);
    } 
Reply
#5

I already tried this. It doesn't work.
Reply
#6

Try this

PHP код:
pickup19 CreatePickup(12743363.5612,-2060.9463,15.39720);
bagwitmoney CreatePickup(15503972.4592, -2356.108991.62490); 
And this
PHP код:
if(pickupid == pickup19
    { 
        
GivePlayerMoney(playerid2500); 
        
DestroyDynamicPickup(pickup19); 
    } 
    else if(
pickupid == bagwitmoney
    { 
        
GivePlayerMoney(playerid150000); 
        
DestroyDynamicPickup(bagwitmoney); 
    } 
Both at the same time
Reply
#7

Try this

PHP код:
pickup19 CreatePickup(12743363.5612,-2060.9463,15.39720);
bagwitmoney CreatePickup(15503972.4592, -2356.108991.62490); 
And this
PHP код:
if(pickupid == pickup19
    { 
        
GivePlayerMoney(playerid2500); 
        
DestroyPickup(pickup19); 
    } 
    else if(
pickupid == bagwitmoney
    { 
        
GivePlayerMoney(playerid150000); 
        
DestroyPickup(bagwitmoney); 
    } 
Both at the same time
Reply
#8

When i pickup it nothing happens.
Reply
#9

I tested your code, but it works fine for me... The pickups show up and they give me money when i pick them up.

Are you sure you have added the plugin to your server.cfg?
Reply
#10

ofcourse.
plugins crashdetect Whirlpool sscanf streamer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)