Someone join and leave messgage script? - 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: Someone join and leave messgage script? (
/showthread.php?tid=337364)
Someone join and leave messgage script? -
cowmilker69 - 26.04.2012
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!
Re: Someone join and leave messgage script? -
RollTi - 26.04.2012
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;
}
Re: Someone join and leave messgage script? -
Scripter12345 - 26.04.2012
Never mind
Re: Someone join and leave messgage script? -
cowmilker69 - 26.04.2012
thanks lots man