Message doesn't display - 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: Message doesn't display (
/showthread.php?tid=447936)
Message doesn't display -
DAVIDXP - 02.07.2013
Hi SA-MP.com, I have a small problem, i putet on OnCommandPerformed this:
pawn Код:
public OnPlayerCommandPerformed( playerid, cmdtext[ ], success )
{
if ( success == 0 )
SendInfo( playerid , "~g~Comanda ~r~%s ~g~nu exista ! Foloseste ~r~/cmds ~g~pentru a te informa ! " , 6000 , cmdtext );
return 1;
}
My SendInfo Stock:
pawn Код:
stock SendInfo( playerid, info[], TIMEs = 3000)
{
if ( P_INFO[ playerid ][ P_Info ] == 1 )
{
KillTimer( InfoTimer[ playerid ] );
TextDrawSetString( Text:Textdraw8[ playerid ], info );
InfoTimer[ playerid ] = SetTimerEx( "HideInfo", TIMEs, false, "i", playerid );
ShowTD( playerid, Textdraw8[ playerid ] );
PlayerPlaySound( playerid, 1085, 0.0,0.0,0.0 );
}
return 1;
}
And my Text:Textdraw8[playerid]:
pawn Код:
Textdraw8[ playerid ] = TextDrawCreate(222.000000, 359.000000, " ");
TextDrawBackgroundColor(Textdraw8[ playerid ], 255);
TextDrawFont(Textdraw8[ playerid ], 1);
TextDrawLetterSize(Textdraw8[ playerid ], 0.370000, 1.199999);
TextDrawColor(Textdraw8[ playerid ], -1);
TextDrawSetOutline(Textdraw8[ playerid ], 0);
TextDrawSetProportional(Textdraw8[ playerid ], 1);
TextDrawSetShadow(Textdraw8[ playerid ], 1);
TextDrawSetSelectable(Textdraw8[ playerid ], 0);
The problem is :
When i write a incorrect command, it must display bthe message that i writed on OnCOmmandPerformed, but nothing displays
NOTE: My Textdraw8 is situated on OnPlayerConnect callback.
What i missed?
Re: Message doesn't display -
Firewire - 02.07.2013
Looks to me you're missing this:
pawn Код:
TextDrawShowForPlayer(playerid,Textdraw8[playerid]);
Place this inside OnPlayerCommandPerformed(If you're trying to tell me you're using ZCMD) and you should see it working. In the code example you pasted, this wasn't the case.