[SA-MP]Enter and leave message
Pagina 1 din 1
[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
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
Adryyy- Administrators
Pagina 1 din 1
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum