O noua comunitate de gaming, plina de tutoriale si informatii utile.
Doriți să reacționați la acest mesaj? Creați un cont în câteva clickuri sau conectați-vă pentru a continua.



 
AcasaAcasa  GalerieGalerie  Ultimele imaginiUltimele imagini  CăutareCăutare  ÎnregistrareÎnregistrare  ConectareConectare  

Distribuiţi
 

 Sistem AFK + Back

Vezi subiectul anterior Vezi subiectul urmator In jos 
AutorMesaj
Rio
Fondator
Fondator
Rio

Zodiac : Taur Mesaje : 285
Data de inscriere : 21/07/2012
Varsta : 27
Localizare : Falticeni

Sistem AFK + Back Empty https://pwgames.forumgratuit.ro
MesajSubiect: Sistem AFK + Back   Sistem AFK + Back EmptyDum Iul 22, 2012 8:31 pm

Pasul 1: Lla inceput gm-ului adaugam:

Cod:
new afk[MAX_PLAYERS];

Pasul 2: Cautam in GM linia public OnPlayerConnect(playerid)

Cod:
afk[playerid] = 0;

Pasul 3: Cautam in GM linia public OnPlayerCommand
Aici trebuie sa adaugam trei comenzi /afk /back /afklist

Comanda /afk:

if(strcmp(cmd, "/afk", true) == 0)
Cod:

{
if(afk[playerid] == 0)
{
afk[playerid] = 1;
SetPlayerColor(playerid,0x737373FF);
TogglePlayerControllable(playerid,0);
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s is away from keyboard.", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
}
return 1;
}

Comanda /back:

if(strcmp(cmd, "/back", true) == 0)
{
Cod:
if(afk[playerid] == 1)
{
afk[playerid] = 0;
SetPlayerToTeamColor(playerid);
TogglePlayerControllable(playerid,1);
GetPlayerName(playerid, sendername, 24);
format(string, 256, "%s is no more away from keyboard.", sendername);
ProxDetector(20.0, playerid, string, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA, 0xC2A2DAAA);
}
return 1;
}
Comanda /afklist:

Cod:
if (strcmp("/afklist", cmdtext, true, 7) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, ".:: AFK Players ::. ");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(afk[playerid] == 1)
{
new name[128];
GetPlayerName(i, name, MAX_PLAYER_NAME);
format(string, 256, "Player: \"%s\" | ID: %d", name, i);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
}
return 1;
}
Sus In jos
puK
Membru
Membru
puK

Mesaje : 6
Data de inscriere : 04/09/2012

Sistem AFK + Back Empty
MesajSubiect: Re: Sistem AFK + Back   Sistem AFK + Back EmptyMar Sept 04, 2012 4:28 am

Folositor...Bravo
Sus In jos
TopGun
Fondator
Fondator
TopGun

Mesaje : 114
Data de inscriere : 22/07/2012
Localizare : Falticeni

Sistem AFK + Back Empty http://www.pwgames.forumgratuit.ro
MesajSubiect: Re: Sistem AFK + Back   Sistem AFK + Back EmptyDum Sept 09, 2012 12:19 am

interesant
Sus In jos
Continut sponsorizat




Sistem AFK + Back Empty
MesajSubiect: Re: Sistem AFK + Back   Sistem AFK + Back Empty

Sus In jos
 

Sistem AFK + Back

Vezi subiectul anterior Vezi subiectul urmator Sus 
Pagina 1 din 1

 Subiecte similare

-
» Counter-Strike Global Offensive ( 2012 ) + Cerinte de sistem

Permisiunile acestui forum:Nu puteti raspunde la subiectele acestui forum
O noua comunitate de gaming, plina de tutoriale si informatii utile. :: PWGames™ - Zona distractiva :: Cosul de gunoi :: Tutoriale si ghiduri-