- 0
Mesajul nu apare
-
Similar Content
-
Salut,imi apare asta cand pornesc serverul,dar eu am bagat acolo in server.cfg ce e nevoie,imi puteti spune va rog problema ?
By leoo671,
- 0 replies
- 519 views
-
- 7 replies
- 487 views
-
- 1 reply
- 1,875 views
-
- 2 replies
- 450 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
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 ]
Link to comment
Share on other sites
5 answers to this question
Recommended Posts