- 0
Mesajul nu apare
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
SpriTe_
Salutare SA-MP.ro de doua saptamani lucrez la un GM de stunt si acum am ajuns la Callbackul OnPlayerCommandPerformed , am facut ca atunci cand scrii o comanda incorecta sa-ti spune ca nu exista..deci ati inteles voi, si nu am pus ca acest text sa apara in chat dar pe display:
[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]
Am creat acest Stock SendInfo, pentru a fi mai usor:
[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]
Si iata Textdrawul care indica pozitia unde va trebui sa fie textul, dimensiunile, etc.
[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);
[/pawn]
The problem is :
Atunci cand scriu comanda incorecta in CHAT nu apare nimic, apsolut !
NOTE: Textdraw8 meu se afla la callbackul OnPlayerConnect, pentru ca conetine [playerid ]
5 answers to this question
Recommended Posts