[Include] ShowInfoForPlayer - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] ShowInfoForPlayer (
/showthread.php?tid=443390)
ShowInfoForPlayer -
Richie© - 11.06.2013
This is the first include i release
What it does:
Show info for player. I replaced alot of SendClientMessage code in my script with this to keep main chat clean.
Examples:
Use:
pawn Code:
ShowInfoForPlayer(playerid, "~r~This red text will be shown to player for 5000ms", 5000);
Put include in the pawno/include and put this under your other includes in the script.
pawn Code:
#include <ShowInfoForPlayer>
Download ShowInfoForPlayer
Feedback is appreciated!
Re: ShowInfoForPlayer -
willsuckformoney - 12.06.2013
This actually looks kinda cool. Although I feel that for a include there should be more features to this. Nice work on it though, I'm have a good look into it.
EDIT: pastebin.
Re: ShowInfoForPlayer -
XtremeR - 12.06.2013
Pretty cool, as will said there could be more features, any ways good one for newbies +3 reps.
Re: ShowInfoForPlayer -
Pottus - 12.06.2013
You can actually remove this. Player TD's are destroy automatically on disconnect.
pawn Code:
hook OnPlayerDisconnect(playerid, reason)
{
PlayerTextDrawDestroy(playerid, InfoText[playerid]);
return 1;
}
Re: ShowInfoForPlayer -
Lordzy - 12.06.2013
Could be a lot more better if there's a bool statement which passes whether a box is required for a message or not.
Re: ShowInfoForPlayer -
Ballu Miaa - 12.06.2013
Not bad at all for a newbie Scripter. Add more features to the include. Keep Learning.
Re: ShowInfoForPlayer -
Richie© - 12.06.2013
Thanks!
I will add more styles to this later :P
Re: ShowInfoForPlayer -
KingHual - 12.06.2013
InfoTextShowing is not even defined.
Re: ShowInfoForPlayer -
Riddick94 - 12.06.2013
Quote:
Originally Posted by [uL]Pottus
You can actually remove this. Player TD's are destroy automatically on disconnect.
pawn Code:
hook OnPlayerDisconnect(playerid, reason) { PlayerTextDrawDestroy(playerid, InfoText[playerid]); return 1; }
|
Does it? I'm just asking because, I see something like this on WIKI:
pawn Code:
public OnPlayerConnect(playerid)
{
pTextdraw[playerid] = CreatePlayerTextDraw(playerid, x, y, "...");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
PlayerTextDrawDestroy(playerid, pTextdraw[playerid]);
return 1;
}
https://sampwiki.blast.hk/wiki/PlayerTextDrawDestroy
Another myth that I heard is.. we don't have to use array for Player Textdraw, and it's actually works for me without array, so why there's an example with array and destroying in disconnect? Can someone explain it then?
Re: ShowInfoForPlayer -
James Coral - 13.06.2013
Code:
C:\Users\eesti\Desktop\server1\pawno\include\ShowInfoForPlayer.inc(36) : error 017: undefined symbol "InfoTextShowing"
C:\Users\eesti\Desktop\server1\pawno\include\ShowInfoForPlayer.inc(36) : warning 215: expression has no effect
C:\Users\eesti\Desktop\server1\pawno\include\ShowInfoForPlayer.inc(36) : error 001: expected token: ";", but found "]"
C:\Users\eesti\Desktop\server1\pawno\include\ShowInfoForPlayer.inc(36) : error 029: invalid expression, assumed zero
C:\Users\eesti\Desktop\server1\pawno\include\ShowInfoForPlayer.inc(36) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
so this is epic fail