Mesaj Intampinare / Iesire
World of MetinsXS :: Jocuri Online :: SA:MP :: Tutoriale
Pagina 1 din 1
Mesaj Intampinare / Iesire
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
Citat: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;
}
Pentru exit
Citat: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:
Citat:filterscripts
adaugati doar numele fara extensie..de ex:
Citat:filterscripts enter exit
Pentru enter
Citat: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;
}
Pentru exit
Citat: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:
Citat:filterscripts
adaugati doar numele fara extensie..de ex:
Citat:filterscripts enter exit
World of MetinsXS :: Jocuri Online :: SA:MP :: Tutoriale
Pagina 1 din 1
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum