OnPlayerConnect[BUG]
#1

if I put a good textdraw in onplayerconnect it dosent show it when I go on server. the text is good. tested on different gamemodes. but this gamemode is not good. please tell, what could cause problem??I put printf and onplayerconnect gets read.. no errors/no warnings


+REP! im not asking. im giving to helpers!
Reply
#2

give us code
Reply
#3

I had this problem before and i found that there is wrong in which line should be first, check if you show the textdraw after defining it! You should show it like this:
pawn Код:
public OnPlayerConnect(playerid)
{
    textdraw1[playerid] = TextDrawCreate(18.500000, 172.083312, "Something");
    TextDrawLetterSize(textdraw1[playerid], 0.280000, 1.160000);
    TextDrawAlignment(textdraw1[playerid], 1);
    TextDrawColor(textdraw1[playerid], -1);
    TextDrawSetShadow(textdraw1[playerid], 0);
    TextDrawSetOutline(textdraw1[playerid], 1);
    TextDrawBackgroundColor(textdraw1[playerid], 51);
    TextDrawFont(textdraw1[playerid], 1);
    TextDrawSetProportional(textdraw1[playerid], 1);
   
    TextDrawShowForPlayer(playerid, textdraw1[playerid]);
    return 1;
}
not like this:
pawn Код:
public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, textdraw1[playerid]);
   
    textdraw1[playerid] = TextDrawCreate(18.500000, 172.083312, "Something");
    TextDrawLetterSize(textdraw1[playerid], 0.280000, 1.160000);
    TextDrawAlignment(textdraw1[playerid], 1);
    TextDrawColor(textdraw1[playerid], -1);
    TextDrawSetShadow(textdraw1[playerid], 0);
    TextDrawSetOutline(textdraw1[playerid], 1);
    TextDrawBackgroundColor(textdraw1[playerid], 51);
    TextDrawFont(textdraw1[playerid], 1);
    TextDrawSetProportional(textdraw1[playerid], 1);
    return 1;
}
Reply
#4

Actually you shouldn't create textdraws in OnPlayerConnect callback! Read more here!
Reply
#5

no no.. the textdraw is good...I tested it on different gamemodes.. but here dosent work..
Reply
#6

make sure u have used TextDrawShowForPlayer() if it is global text draw and PlayerTextDrawShow(); fot players textdraw
it could be also because the max text draw limit has been reached
Reply
#7

You created global textdraws under a player callback, switch to player-textdraws and try again.
Reply
#8

ONPLAYERCONNECT:

PHP код:
Welcome[playerid] = TextDrawCreate(233.792083160.416671"WELCOME TO WINGSUIT");
                        
TextDrawLetterSize(Welcome[playerid], 0.4499991.600000);
                        
TextDrawAlignment(Welcome[playerid], 1);
                        
TextDrawColor(Welcome[playerid], -1523963137);
                        
TextDrawSetShadow(Welcome[playerid], 0);
                        
TextDrawSetOutline(Welcome[playerid], 0);
                        
TextDrawBackgroundColor(Welcome[playerid], 51);
                        
TextDrawFont(Welcome[playerid], 2);
                        
TextDrawSetProportional(Welcome[playerid], 1); 
PHP код:
NEW:
new 
Text:Welcome[MAX_PLAYERS]; 
ONDIALOG:


PHP код:
if(dialogid == 2327)
                        {
                            if(
response)
                            {
                                if(
GetPlayerCash(playerid) < 5000) return SendClientMessage(playerid0x00D900C8"Nu aveti suma de 5000Lei!");
                                
GivePlayerCash(playerid, -5000);
                                
SetPlayerPos(playerid, -275,-633,16502);
                                
TextDrawShowForPlayer(playerid,Welcome[playerid]);
                                
TextDrawShowForPlayer(playerid,Boxxxx[playerid]);
                                
SetTimerEx("TextDest"1500false"i"playerid);
                                
GivePlayerWeapon(playerid461);
                                
TogglePlayerControllable(playeridfalse);
                            }
                            else return 
true;
                        } 
Reply
#9

anybody
Reply
#10

Whit what you are connect the dialog any command or what ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)