[Include] ShowInfoForPlayer
#1

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!
Reply
#2

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.
Reply
#3

Pretty cool, as will said there could be more features, any ways good one for newbies +3 reps.
Reply
#4

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;
}
Reply
#5

Could be a lot more better if there's a bool statement which passes whether a box is required for a message or not.
Reply
#6

Not bad at all for a newbie Scripter. Add more features to the include. Keep Learning.
Reply
#7

Thanks!
I will add more styles to this later :P
Reply
#8

InfoTextShowing is not even defined.
Reply
#9

Quote:
Originally Posted by [uL]Pottus
View Post
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?
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)