[HELP] Join/Leave/Kick Textdraw. (+REP for Help) - 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: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] Join/Leave/Kick Textdraw. (+REP for Help) (
/showthread.php?tid=591818)
[HELP] Join/Leave/Kick Textdraw. (+REP for Help) -
DarkBoyy - 17.10.2015
Hi Guys,
I would like to make a Textdraw for my Server, Like
[Green]Join: [White]%s (%d)
[Pink/Purple]Kick: [White]%s (%d)
[Yellow]Time: [White]%s (%d)
Screenshots:-
Re: [HELP] Join/Leave/Kick Textdraw. (+REP for Help) -
xTURBOx - 17.10.2015
I suggest using a textdraw editor
Re: [HELP] Join/Leave/Kick Textdraw. (+REP for Help) -
DarkBoyy - 17.10.2015
I asked to script it for me, if someone makes for me then +REP to that person
Re: [HELP] Join/Leave/Kick Textdraw. (+REP for Help) -
Luicy. - 17.10.2015
PHP код:
#define Col_Green "{6BAB64}"
#define Col_Purple "{AB57D4}"
#define Col_White "{FFFFFF}"
#define Col_Yellow "{FFFF00}"
new Text:dc1;
public OnPlayerDisconnect(playerid, reason)
{
new
szString[64],
playerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
if(reason == 3)
{
TextDrawHideForPlayer(playerid,dc1);
format(szString, sizeof szString, ""Col_Purple"Kick: "Col_White"%s (%d).", playerName, playerid);
dc1 = TextDrawCreate(180.000000, 100.000000, szString);
TextDrawShowForPlayer(playerid,dc1);
}
else if(reason == 1)
{
TextDrawHideForPlayer(playerid,dc1);
format(szString, sizeof szString, ""Col_Yellow"Quit: "Col_White"%s (%d).", playerName, playerid);
dc1 = TextDrawCreate(180.000000, 100.000000, szString);
TextDrawShowForPlayer(playerid,dc1);
}
return 1;
}
public OnPlayerConnect(playerid)
{
TextDrawHideForPlayer(playerid,dc1);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,""Col_Green"Join: "Col_White"%s (%d).",pName,playerid);
dc1 = TextDrawCreate(180.000000, 100.000000, szString);
TextDrawShowForPlayer(playerid,dc1);
return 1;
}
There you go, enjoy.
Re: [HELP] Join/Leave/Kick Textdraw. (+REP for Help) -
Face9000 - 17.10.2015
Why creating everytime the textdraw? Create it once and update it using TextdrawSetString instead.
Re: [HELP] Join/Leave/Kick Textdraw. (+REP for Help) -
DarkBoyy - 18.10.2015
Thanks Guys, Alredy got the textdraw but +Rep to Mellor
Re: [HELP] Join/Leave/Kick Textdraw. (+REP for Help) -
Luicy. - 18.10.2015
Alright, Thank you.