GameTextForPlayer pickup message
#1

Alright, I made some pickups, and I wanted to make some messages for them for when a player ran them over, I have but the messages don't appear..

pawn Код:
if(pickupid == LSAP)
        {
        GameTextForPlayer(playerid,"~y~ Los Santos Airport Entrance. ~n~ ~r~/enterap ~y~ to enter.",3500,3);
        }
    if(pickupid == Shamal)
        {
        GameTextForPlayer(playerid,"~y~ Shamal Exit. ~n~ ~r~/shamal ~y~ to exit.",3500,3);
        }
    if(pickupid == LSAPI)
        {
        GameTextForPlayer(playerid,"~y~ Los Santos Airport Exit. ~n~ ~r~/exitap ~y~ to exit.",3500,3);
        }
    return 1;
    }
Anyone know why the messages wont appear when you run over the pickup?
pawn Код:
LSAP = CreateDynamicPickup(1318, 1, 1730.499, -2334.663,13.320, -1);
    Shamal = CreateDynamicPickup(1318, 1, 1.63, 22.98, 1199.59, -1);
    LSAPI = CreateDynamicPickup(1318, 1, -1855.764, 44.313, 1055.470, -1);
Reply
#2

Is the code under OnPlayerPickupPickup, or whatever it is called ?


Have you defined the LSAP + Shamal + LSAPI

e.g

new LSAP;
new Shamal;
new LSAP1;


if then, i dunno.
Reply
#3

Yes and yes..
It used to work but for some reason it wont anymore..
Also if it has anything to do with it.. im using incognitos plugin
Reply
#4

why dont you just sendclientmessage instead of gametext
Reply
#5

Quote:
Originally Posted by TheYoungCapone
Посмотреть сообщение
why dont you just sendclientmessage instead of gametext
Because obviously he want to use GameTextForPlayer..

it looks a bit nicer

btw if you did like this then it should work
pawn Код:
#include <a_samp>
#include <streamer>

new LSAP, Shamal, LSAPI;

public OnGameModeInit()
{
    LSAP = CreateDynamicPickup(1318, 19, 1730.499, -2334.663,13.320, -1, -1, 300);
    Shamal = CreateDynamicPickup(1318, 19, 1.63, 22.98, 1199.59, -1, -1, 300);
    LSAPI = CreateDynamicPickup(1318, 19, -1855.764, 44.313, 1055.470, -1, -1, 300);
}

public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    if(pickupid == LSAP)
    {
        GameTextForPlayer(playerid,"~y~ Los Santos Airport Entrance. ~n~ ~r~/enterap ~y~ to enter.",3500,3);
    }
   
    else if(pickupid == Shamal)
    {
        GameTextForPlayer(playerid,"~y~ Shamal Exit. ~n~ ~r~/shamal ~y~ to exit.",3500,3);
    }

    else if(pickupid == LSAPI)
    {
        GameTextForPlayer(playerid,"~y~ Los Santos Airport Exit. ~n~ ~r~/exitap ~y~ to exit.",3500,3);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)