[HELP] Problem with Pickups.
#1

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.
Reply
#2

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;
   }
}
Reply
#3

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

Show us how you define these pickups.
Reply
#5

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.
Reply
#6

So ? Any idea where is the problem ?
Reply
#7

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;
}
Reply
#8

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


Forum Jump:


Users browsing this thread: 1 Guest(s)