SA-MP Forums Archive
gameplayertext help - 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: gameplayertext help (/showthread.php?tid=245096)



gameplayertext help - Venice - 30.03.2011

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


Re: gameplayertext help - grand.Theft.Otto - 30.03.2011

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.


Re: gameplayertext help - antonio112 - 30.03.2011

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


Re: gameplayertext help - Venice - 30.03.2011

Not Work


Re: gameplayertext help - antonio112 - 30.03.2011

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


Re: gameplayertext help - Venice - 30.03.2011

please readd this antonio
Quote:

i need to show this when in vehicles




Re: gameplayertext help - Skylar Paul - 30.03.2011

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



Re: gameplayertext help - antonio112 - 30.03.2011

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.


Re: gameplayertext help - Venice - 30.03.2011

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"



Re: gameplayertext help - NeTuddMeg - 30.03.2011

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