SA-MP Forums Archive
GameTextForPlayer pickup message - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: GameTextForPlayer pickup message (/showthread.php?tid=250628)



GameTextForPlayer pickup message - patfay - 23.04.2011

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);



Re: GameTextForPlayer pickup message - GamingTurf - 23.04.2011

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.


Re: GameTextForPlayer pickup message - patfay - 23.04.2011

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


Re: GameTextForPlayer pickup message - TheYoungCapone - 23.04.2011

why dont you just sendclientmessage instead of gametext


Re: GameTextForPlayer pickup message - Laronic - 23.04.2011

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;
}