Join/leave/timeout message textdraw
#1

Let me get to the point.I am looking for join/leave/timedout textdraw messages that dissappear after couple of seconds.I was looking around the web but couldn't find that kind of stuff.Any help is appriciated.
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=527744 - #1
https://sampwiki.blast.hk/wiki/Creating_...Leave_Messages - #2
Код:
#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; 
}
Enojy! Next time look better
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)