Posts: 368
Threads: 24
Joined: Feb 2012
11.06.2013, 20:56
(
Last edited by Richie©; 13/06/2013 at 08:50 PM.
)
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!
Posts: 1,494
Threads: 120
Joined: Dec 2009
Reputation:
0
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.
Posts: 867
Threads: 27
Joined: Aug 2012
Reputation:
0
Pretty cool, as will said there could be more features, any ways good one for newbies +3 reps.
Posts: 2,698
Threads: 37
Joined: Mar 2012
Reputation:
0
Could be a lot more better if there's a bool statement which passes whether a box is required for a message or not.
Posts: 1,849
Threads: 96
Joined: Apr 2010
Reputation:
0
Not bad at all for a newbie Scripter. Add more features to the include. Keep Learning.
Posts: 368
Threads: 24
Joined: Feb 2012
Thanks!
I will add more styles to this later :P
Posts: 2,286
Threads: 18
Joined: Jun 2010
InfoTextShowing is not even defined.
Posts: 1,767
Threads: 124
Joined: Mar 2010
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?