02.07.2013, 11:43
Hi SA-MP.com, I have a small problem, i putet on OnCommandPerformed this:
My SendInfo Stock:
And my Text:Textdraw8[playerid]:
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?
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;
}
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;
}
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);
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?