Jump to content
  • 0

pomoc Kde mám chybu? :O


w.endelin

Dotaz

Ahojda, mám takový problém, furt nemohu přijít na to, kde mám chybu?
 

funkce InfoBox(playerid, ms_time, text[])
{
    PlayerTextDrawSetString(playerid, InfoBoxD[playerid], text);
    PlayerTextDrawShow(playerid, InfoBoxD[playerid]);
    SetTimerEx("InfoBox_off", ms_time, false, "i", playerid);
    return 1;
}
funkce InfoBox_off
{
	PlayerTextDrawHide(playerid, InfoBoxD[playerid]);
	return 1;
}

(( Je to něco jako info box, s tím že do příkazu si pak dám "InfoBox(playerid, 3000, "Ahoj");" a zobrazí se mu ten textdraw s tímhle stringem, ale nevím proč, nejde mi to.. :''(

Děkuji předem za pomoc.

Link to comment
Share on other sites

6 odpovědí na tuto otázku

Recommended Posts

  • 0

Místo

PlayerTextDrawSetString(playerid, InfoBoxD[playerid], text);

dej

TextDrawSetString(InfoBoxD[playerid],text);

a místo

PlayerTextDrawShow(playerid, InfoBoxD[ playerid ]);

dej

TextDrawShowForPlayer(playerid,InfoBoxD[playerid]);
Link to comment
Share on other sites

  • 0

Furt mi to píše tyhle errory: (ikdyž jsem to udělala podle tebe :'()

 

*.pwn (975) : error 028: invalid subscript (not an array or too many subscripts): "InfoBoxD"
*.pwn (975) : warning 215: expression has no effect
*.pwn (975) : error 001: expected token: ";", but found "]"
*.pwn (975) : error 029: invalid expression, assumed zero
*.pwn (975) : fatal error 107: too many error messages on one line

Link to comment
Share on other sites

  • 0

Definice 'funkce'
 

#define funkce%0(%1) \
		forward%0(%1); public%0(%1)

Textdraw by vytvořenej měl bejt (podle mě)
 

new Text:InfoBoxD;

	InfoBoxD = TextDrawCreate(139.000000, 412.000000, "Motor nastartuje pomoci klavesy '~y~Mezernik~w~'");
	TextDrawBackgroundColor(InfoBoxD, 255);
	TextDrawFont(InfoBoxD, 1);
	TextDrawLetterSize(InfoBoxD, 0.270000, 1.000000);
	TextDrawColor(InfoBoxD, -1);
	TextDrawSetOutline(InfoBoxD, 0);
	TextDrawSetProportional(InfoBoxD, 1);
	TextDrawSetShadow(InfoBoxD, 1);
Link to comment
Share on other sites

  • 0
new Text:InfoBoxD[MAX_PLAYERS]; //tvuj max počet hráčů
 
    InfoBoxD[playerid] = TextDrawCreate(139.000000, 412.000000, "Motor nastartuje pomoci klavesy '~y~Mezernik~w~'");
    TextDrawBackgroundColor(InfoBoxD[playerid], 255);
    TextDrawFont(InfoBoxD[playerid], 1);
    TextDrawLetterSize(InfoBoxD[playerid], 0.270000, 1.000000);
    TextDrawColor(InfoBoxD[playerid], -1);
    TextDrawSetOutline(InfoBoxD[playerid], 0);
    TextDrawSetProportional(InfoBoxD[playerid], 1);
    TextDrawSetShadow(InfoBo

xD[playerid], 1);

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...