SA-MP Forums Archive
Text Draw ! - 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)
+--- Thread: Text Draw ! (/showthread.php?tid=302820)



Text Draw ! - dorperez - 10.12.2011

This textdraw is stuck on the top of my gm untill I get into a car and change station..How can I make it disappear ?



http://uper.co.il/codes.php?id=3e2f3330b740ba.png

Tnx Guys !!


Re: Text Draw ! - MadeMan - 10.12.2011

Top of your gm??

Find the part in your script that creates it.


Re: Text Draw ! - dorperez - 11.12.2011

I found the script of it :

pawn Код:
new StationTitle[16][1][64] = {
    {"InLive-FM (Recommanded)"}, {"HitParty-FM"}, {"Idobi-FM"},
    {"METAL ONLY"}, {"Radio Paloma"}, {"MUSIK.Extream"},
    {"Techno4ever Radio"},{"DEFJAY.COM"}, {"TechnoBase.FM"},
    {"Music One"}, {"Radio Jackie"},{"Suburds of Goa"},
    {"Groove Salad"}, {"AAN Country"},{"KickRadio"},{"Radio Off"}
};



Re: Text Draw ! - wildcookie007 - 11.12.2011

If I'm correct the textdraw only shows when you are in car, but when you leave the car the textdraw stays right? Try using TextDrawHideForPlayer onplayerexitvehicle or onstatechange from state_driver to state_onfoot


Re: Text Draw ! - dorperez - 11.12.2011

The textdraw should be when you enter to car but it shows when you are connect to the server..


Re: Text Draw ! - THE_KNOWN - 11.12.2011

OnPlayerSpawn : TextDrawHideForPlayer(playerid,textdrawname);

OnPlayerStateChange:
pawn Код:
if(newstate == PLAYER_STATE_DRIVER)
{
       TextDrawShowForPlayer(playerid,textdrawname);
}



Re: Text Draw ! - dorperez - 11.12.2011

pawn Код:
C:\GTA - San Andreas\Server\gamemodes\Rp11Back.pwn(5018) : error 035: argument type mismatch (argument 2)
C:\GTA - San Andreas\Server\gamemodes\Rp11Back.pwn(6491) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

5018:

    TextDrawHideForPlayer(playerid,StationText);

6491:

    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
       TextDrawShowForPlayer(playerid,StationText);
    }



Re: Text Draw ! - THE_KNOWN - 11.12.2011

StationText is not the Textdraw name.

search for TextDrawSetString() that has StationText in it and use the textdraw name in it


Re: Text Draw ! - suhrab_mujeeb - 11.12.2011

Is the variable something like
new Text:StationText;

OR

new StationText;?


Re: Text Draw ! - THE_KNOWN - 11.12.2011

pawn Код:
new StationTitle[16][1][64] = {
    {"InLive-FM (Recommanded)"}, {"HitParty-FM"}, {"Idobi-FM"},
    {"METAL ONLY"}, {"Radio Paloma"}, {"MUSIK.Extream"},
    {"Techno4ever Radio"},{"DEFJAY.COM"}, {"TechnoBase.FM"},
    {"Music One"}, {"Radio Jackie"},{"Suburds of Goa"},
    {"Groove Salad"}, {"AAN Country"},{"KickRadio"},{"Radio Off"}
};
was mentioned earlier