Someone join and leave messgage script?
#1

Ya hi im new to this and i just wanna start a vanilla server with my friends. I'm just asking if anyone knows of a plugin or script whatever that broadcasts a message whenever someone joins and leaves, and also for a cops plugin where you can get wanted like in the single player. Thanks in advance!
Reply
#2

pawn Код:
public OnPlayerConnect(playerid)
{
     new msg[128], name[MAX_PLAYER_NAME];
     GetPlayerName(playerid, name, MAX_PLAYER_NAME);
     format(msg, 128, "%s has join 'Your Server Name'", name);
     SendClientMessageToAll(-1, msg);
     return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
     new msg[128], name[MAX_PLAYER_NAME];
     GetPlayerName(playerid, name, MAX_PLAYER_NAME);
     switch(reason)
     {
           case 0: format(msg, 128, "%s has left 'Your Server Name' (Timedout/Crash)", name);
           case 1: format(msg, 128, "%s has left 'Your Server Name' (Left)", name);
           case 2: format(msg, 128. "%s has left 'Your Server Name' (Kicked/Banned)", name);
     }
     SendClientMessageToAll(0xAFAFAFAA,msg);
     return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
     if(killerid != INVALID_PLAYER_ID)
     {
          SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 1);
     }
     return 1;
}
Reply
#3

Never mind
Reply
#4

thanks lots man
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)