Pickups..
#1

Hi, I was wondering what would I use to make it so when a player walks in to a Pickup how could I set it so some text's come on to there screen?
Reply
#2

pawn Код:
OnPlayerPickup

if(pickupd = YOURPICKUP)
{
  /*send message*/
}
Reply
#3

https://sampwiki.blast.hk/wiki/AddStaticPickup

pawn Код:
new TextPickup;

public OnGameModeInit()
{
    TextPickup = AddStaticPickup(400, 2, 0.0, 0.0, 0.0, 0);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == TextPickup)
    {
        SendClientMessage(playerid, 0xFAFAFAF, "Your Text Here");
    }
    return 1;
}
Reply
#4

@Lethal I get these warnings...

Код:
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LSRP.pwn(201) : warning 211: possibly unintended assignment
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LSRP.pwn(205) : warning 211: possibly unintended assignment
Reply
#5

The code I posted shouldn't give errors..
Reply
#6

Quote:
Originally Posted by Luis the Lobster
Посмотреть сообщение
@Lethal I get these warnings...

Код:
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LSRP.pwn(201) : warning 211: possibly unintended assignment
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LSRP.pwn(205) : warning 211: possibly unintended assignment
What is line 201? Pothead's script should not give you errors.
Reply
#7

It didn't thank you
Reply
#8

Quote:
Originally Posted by PotH3Ad
Посмотреть сообщение
Umm did you actually look at what AddStaticPickup returns?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)