SA-MP Forums Archive
[HELP] Problem with Pickups. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] Problem with Pickups. (/showthread.php?tid=528325)



[HELP] Problem with Pickups. - Lexus95 - 27.07.2014

Hello. Well i've created a pickup, and the pickup shows IG,it's supposed to send the Player a message saying for example "Los Santos Bank" when he steps on it. But when i really step on it IG nothing shows.
Here is the script:
Код:
public OnPlayerPickupPickup(playerid, pickupid)
{
   if(pickupid == PoliceDepartementPickup)
   {
   GameTextForPlayer(playerid,"~y~Los Santos Police Departement",3400,3);
   }
   if(pickupid == CityHallpickup)
   {
   GameTextForPlayer(playerid,"~y~Los Santos City Hall",3400,3);
   }
   if(pickupid == Bankpickup)
   {
   GameTextForPlayer(playerid,"~y~Los Santos Bank", 3500, 2);
   }
}
i've tryed OnPlayerPickupPickup and On PlayerPickupDynamicePickup, but it's the same problem, nothing shows :/. Any idea what's the problem ?
And thanks in advance.


Re: [HELP] Problem with Pickups. - GShock - 27.07.2014

You forgot return 1;

try

pawn Код:
public OnPlayerPickupPickup(playerid, pickupid)
{
   if(pickupid == PoliceDepartementPickup)
   {
        GameTextForPlayer(playerid,"~y~Los Santos Police Departement",3400,3);
        return 1;
   }
   if(pickupid == CityHallpickup)
   {
        GameTextForPlayer(playerid,"~y~Los Santos City Hall",3400,3);
        return 1;
   }
   if(pickupid == Bankpickup)
   {
        GameTextForPlayer(playerid,"~y~Los Santos Bank", 3500, 2);
        return 1;
   }
}



Re : [HELP] Problem with Pickups. - Lexus95 - 27.07.2014

Oh yeah, i am stupid. i did that, but still the same problem


Re: [HELP] Problem with Pickups. - Beckett - 27.07.2014

Show us how you define these pickups.


Re : Re: [HELP] Problem with Pickups. - Lexus95 - 27.07.2014

Quote:
Originally Posted by DaniceMcHarley
Посмотреть сообщение
Show us how you define these pickups.
Код:
new PoliceDepartementPickup;
new CityHallpickup;
new Bankpickup;

public OnGameModeInit()
{
        PoliceDepartementPickup = CreatePickup( 1239,1,1554.2363,-1675.7021,16.1953,0);
	CityHallpickup = CreatePickup(1239,1,1481.1147,-1770.8445,18.7958,0);
	Bankpickup = CreatePickup(1274,1,1466.8026,-1009.9214,26.8438,0);
        return 1;
}
Here you go.


Re : [HELP] Problem with Pickups. - Lexus95 - 27.07.2014

So ? Any idea where is the problem ?


Re: [HELP] Problem with Pickups. - GShock - 27.07.2014

Try now
pawn Код:
public OnPlayerPickupPickup(playerid, pickupid)
{
   if(pickupid == PoliceDepartementPickup)
   {
        GameTextForPlayer(playerid,"~y~Los Santos Police Departement",3400,3);
        return 1;
   }
   if(pickupid == CityHallpickup)
   {
        GameTextForPlayer(playerid,"~y~Los Santos City Hall",3400,3);
        return 1;
   }
   if(pickupid == Bankpickup)
   {
        GameTextForPlayer(playerid,"~y~Los Santos Bank", 3500, 2);
        return 1;
   }
return 1;
}



Re : [HELP] Problem with Pickups. - Lexus95 - 27.07.2014

Nope, tryed that aswell, but nothing shows.. i am really confused.