World of Metin

[SA-MP]Enter and leave message

View previous topic View next topic Go down

[SA-MP]Enter and leave message

Post by A.Levine on Fri Sep 14, 2012 10:13 am

[SA-MP]Enter and leave message
Acest plugin arata un mesaj cand un player intra sau iese de pe server ... pentru inceput va dau codurile pawno in caz ca vreti sa modificati mesajul..
Pentru enter :

Cod:
public OnPlayerConnect(playerid)
{
new pName[30], string[256];
GetPlayerName(playerid, pName, 30);
format(string, 256, "%s has joined the server.", pName);
SendClientMessageToAll(COLOR_GREY,string);
return 1;
}

si pentru exit

Cod:
public OnPlayerDisconnect(playerid, reason)
{
switch(reason)
{
case 0:
{
new pName[30], string[256];
GetPlayerName(playerid, pName, 30);
format(string, 256, "%s has left the server.(Timeout)", pName);
SendClientMessageToAll(COLOR_GREY, string);
}
case 1:
{
new pName[30], string[256];
GetPlayerName(playerid, pName, 30);
format(string, 256, "%s has left the server.(Leaving)", pName);
SendClientMessageToAll(COLOR_GREY, string);
}
case 2:
{
new pName[30], string[256];
GetPlayerName(playerid, pName, 30);
format(string, 256, "%s has left the server.(Kicked)", pName);
SendClientMessageToAll(COLOR_GREY, string);
}
}
return 1;
}

Ca sa le compilati intrati in Pawno,stergeti tot din new project si dati paste la aceste coduri,apoi apasati f5.Se vor salva in directorul pawno 2 fisiere...unul.amx si unul.pwn sa zicem enter.pwn enter.amx exit.pwn si exit.amx.Aceste fisiere le puneti in directorul cu serverul in folderul filterscripts.Apoi deschideti server.cfg si la linia:

Cod:
filterscripts

adaugati doar numele fara extensie..de ex:

Cod:
filterscripts enter exit

HF !

A.Levine
Administrator
Administrator

Posts : 931
Reputation : 0
Join date : 19/10/2010
Age : 18
Location : Hunedoara

View user profile http://world-of-metin.big-forum.net

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum