Jump to content
  • 0

pomoc Nevyvolán Stocku


Lurk

Dotaz

Mám problém s vyvoláním stocku HideInfo. Při zadání ShowInfo(playerid,"Ahoj",7); se mi zpráva zobrazí ale již nezmizí. Přidal jsem si tam SCMTA a zjistil jsem ze stock HideInfo se nevyvolal. Nevíte v čem je chyba?

 

stock ShowInfo(playerid, text[], time=5)
{
TextDrawShowForPlayer(playerid, Textdraw[playerid][sub]);
TextDrawSetString(Textdraw[playerid][sub], text);
SetTimerEx("HideInfo", 1000*time, 0, "i", playerid);
return 0;
}

stock HideInfo(playerid){
TextDrawHideForPlayer(playerid, Textdraw[playerid][sub]);
return 1;
}

Link to comment
Share on other sites

6 odpovědí na tuto otázku

Recommended Posts

  • 0

Mám problém s vyvoláním stocku HideInfo. Při zadání ShowInfo(playerid,"Ahoj",7); se mi zpráva zobrazí ale již nezmizí. Přidal jsem si tam SCMTA a zjistil jsem ze stock HideInfo se nevyvolal. Nevíte v čem je chyba?

 

stock ShowInfo(playerid, text[], time=5)
{
TextDrawShowForPlayer(playerid, Textdraw[playerid][sub]);
TextDrawSetString(Textdraw[playerid][sub], text);
SetTimerEx("HideInfo", 1000*time, 0, "i", playerid);
return 0;
}

stock HideInfo(playerid){
TextDrawHideForPlayer(playerid, Textdraw[playerid][sub]);
return 1;
}

 

To druhé je public

 

forward HideInfo(playerid);
public HideInfo(playerid)
{
TextDrawHideForPlayer(playerid, Textdraw[playerid][sub]);
return 1;
}

  • Líbí se mi to! (+1) 1
Link to comment
Share on other sites

  • 0

proc vlastne vyuzivas TextDrawCreate... Potom sa to pletie.. Preto radim pouzivat funkciu CreatePlayerTextDraw :)

 

A kde napísal, že využíva TextDrawCreate?

Link to comment
Share on other sites

  • 0

Logika vieš, keď nepoužíva funkcie ako npr. PlayerTextDrawSetString a PlayerTextDrawShow ale TextDrawSetString tak je jasné že používa globálne textdrawy (TextDrawCreate) a nie hráčske (CreatePlayerTextDraw)

 

Jáj no nevšimol som si toho.... Ešte asi spím sorry :d

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...