gametextforplayer too big
#1

hi, gametextforplayer is so big but it's not so long, and i want to make it smaller :$
pawn Код:
if(newkeys & KEY_SECONDARY_ATTACK)
    {
         if(IsPlayerInRangeOfPoint(playerid, 1.0, 1610.8748,-1893.8821,13.5469))
        {
            if (PlayerInfo[playerid][pJob] == 0)
            {
                PlayerInfo[playerid][pJob] = 34;
                PlayerPlaySound(playerid, 1058, 0.0, 0.0, 10.0);
                GameTextForPlayer(playerid,"Zaposleni ste kao zastitar",200,1);
            }
            else
            {
                GameTextForPlayer(playerid,"~r~Vec ste zaposleni - dajte otkaz prvo", 200,1);
            }
        }
picture : http://i.imgur.com/lpr5kTQ.jpg
Reply
#2

on default sa it looks normal, you just use different files for sa which makes the text font like that.
Reply
#3

Use ~n~ for a new line, like
pawn Код:
GameTextForPlayer(playerid,"~r~Vec ste zaposleni~n~dajte otkaz prvo", 200,1);
Reply
#4

@Neonman : so why is on this server like this ? : http://i.imgur.com/p7HSURA.jpg
@IstuntmanI : i know for that but i want that in one line. :$$
Reply
#5

That is textdraw, not gametext (as far as I can tell, because of the mod).
Reply
#6

Quote:
Originally Posted by leetboi
Посмотреть сообщение
hi, gametextforplayer is so big but it's not so long, and i want to make it smaller :$
pawn Код:
if(newkeys & KEY_SECONDARY_ATTACK)
    {
         if(IsPlayerInRangeOfPoint(playerid, 1.0, 1610.8748,-1893.8821,13.5469))
        {
            if (PlayerInfo[playerid][pJob] == 0)
            {
                PlayerInfo[playerid][pJob] = 34;
                PlayerPlaySound(playerid, 1058, 0.0, 0.0, 10.0);
                GameTextForPlayer(playerid,"Zaposleni ste kao zastitar",200,1);
            }
            else
            {
                GameTextForPlayer(playerid,"~r~Vec ste zaposleni - dajte otkaz prvo", 200,1);
            }
        }
picture : http://i.imgur.com/lpr5kTQ.jpg
One more thing if your going to do this and plan of having lots of if(IsPlayerInRangeOfPoint()) at least add this to prevent spamming this code.

pawn Код:
// Define as global variable

#define ACCESS_DELAY 2000 // Two seconds

new AccessTime[MAX_PLAYERS];

if(newkeys & KEY_SECONDARY_ATTACK)
    {
        if(GetTickCount() - AccessTime[playerid] > ACCESS_DELAY)
        {
           AccessTime[playerid] = GetTickCount();
           if(IsPlayerInRangeOfPoint(playerid, 1.0, 1610.8748,-1893.8821,13.5469))
           {
               if (PlayerInfo[playerid][pJob] == 0)
               {
                PlayerInfo[playerid][pJob] = 34;
                PlayerPlaySound(playerid, 1058, 0.0, 0.0, 10.0);
                GameTextForPlayer(playerid,"Zaposleni ste kao zastitar",200,1);
            }
            else
            {
                GameTextForPlayer(playerid,"~r~Vec ste zaposleni - dajte otkaz prvo", 200,1);
            }
            }
    }
That will prevent any excessive spamming, but I wouldn't even use IsPlayerInRangeOfPoint() at all there is a much better way by using Incognito's streamer and Dynamic areas.
Reply
#7

@Vince i don't think so :S
@Pottus, i need to make "Vec ste zaposleni - dajte otkaz prvo" smaller nothing else :$
Reply
#8

Quote:
Originally Posted by leetboi
Посмотреть сообщение
@Vince i don't think so :S
@Pottus, i need to make "Vec ste zaposleni - dajte otkaz prvo" smaller nothing else :$
Forget the gametext then and make your own textdraw function then you can make the text any size you want.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)