gameplayertext help
#1

pawn Код:
if(pickupid == iNEON) // NEON
        {
        GameTextForPlayer(playerid, "~w~Type ~r~/neon ~w~Mod Your Car", 5000, 5);
        return 1;
        }
i need to show this when in vehicles


sorry for bad english :P
Reply
#2

pawn Код:
if(IsPlayerInAnyVehicle(playerid))
{
       return  GameTextForPlayer(playerid, "~w~Type ~r~/neon ~w~Mod Your Car", 5000, 5);
}
Untested, not sure if it will work though.
Reply
#3

pawn Код:
new iNEON;

public OnGameModeInit()
{
     iNEON = CreatePickup(1239, 14, X,  Y,  Z, -1);// Set your coordinates instead of X, Y and Z
}
And now you can use:
pawn Код:
if(pickupid == iNEON) // NEON
        {
        GameTextForPlayer(playerid, "~w~Type ~r~/neon ~w~Mod Your Car", 5000, 5);
        return 1;
        }
What I did, is creating a pickup, which`s type is 14, which means can be picked up from vehicles ..

You can find all about pickups at this page: https://sampwiki.blast.hk/wiki/Pickup_help
Reply
#4

Not Work
Reply
#5

It`s not possible ... give me your "OnPlayerPickUpPickup" function please.

Try the following thing:

pawn Код:
if(pickupid == iNeon) GameTextForPlayer(playerid, "~w~Type ~r~/neon ~w~Mod Your Car", 5000, 3);
I recommend using Text Style 3 ... because 5, according to samp.wiki "Displays for 3 seconds, regardless of what time you set. "

You can check it out here: https://sampwiki.blast.hk/wiki/GameTextStyle
Reply
#6

please readd this antonio
Quote:

i need to show this when in vehicles

Reply
#7

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
GameTextForPlayer(playerid, "~w~Type ~r~/neon ~w~Mod Your Car", 5000, 5);
    }
    return 1;
}
Reply
#8

Quote:
Originally Posted by venice
Посмотреть сообщение
please readd this antonio
You mean when you enter a vehicle? If yes, why the hell would you use a pickup ?

I tought you want, when you pickup a specific pickup (when you're driving) to appear that ...

Use Skylar`s example, I guess it works.
Reply
#9

Quote:
Originally Posted by Skylar Paul
Посмотреть сообщение
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
GameTextForPlayer(playerid, "~w~Type ~r~/neon ~w~Mod Your Car", 5000, 5);
    }
    return 1;
}
error in new state

Код:
C:\Users\Vijay_Rasigan\Desktop\COD MW\COD MW\gamemodes\COD5.pwn(8240) : error 017: undefined symbol "newstate"
Reply
#10

U can't pick up the pickup, while in vehicle.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)