gametextforplayer too big -
leetboi - 27.05.2013
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
Re: gametextforplayer too big - Astralis - 27.05.2013
on default sa it looks normal, you just use different files for sa which makes the text font like that.
Re: gametextforplayer too big -
IstuntmanI - 27.05.2013
Use ~n~ for a new line, like
pawn Код:
GameTextForPlayer(playerid,"~r~Vec ste zaposleni~n~dajte otkaz prvo", 200,1);
Re: gametextforplayer too big -
leetboi - 27.05.2013
@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. :$$
Re: gametextforplayer too big -
Vince - 27.05.2013
That is textdraw, not gametext (as far as I can tell, because of the mod).
Re: gametextforplayer too big -
Pottus - 27.05.2013
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.
Re: gametextforplayer too big -
leetboi - 27.05.2013
@Vince i don't think so :S
@Pottus, i need to make "Vec ste zaposleni - dajte otkaz prvo" smaller nothing else :$
Re: gametextforplayer too big -
Pottus - 27.05.2013
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.