OnPlayerConnect:
pawn Код:
public OnPlayerConnect(playerid)
{
//Hungry[playerid] = 0;
new plname[MAX_PLAYER_NAME];
// new giveplayerid;
new string[128];
IntentarTimmer[playerid] = 0; Registrando[playerid] = 0; Orejon[playerid] = 0; VHabGolpeo[playerid] = 0; AFK[playerid] = 0; AdminDuty[playerid] = 0;
ResetearArmas(playerid); PlayerInfo[playerid][jSpawn] = 0; PlayerInfo[playerid][jInt] = 0; HelpMessages[playerid] = 0; PlayerInfo[playerid][jClothes] = 0; PlayerInfo[playerid][jTyrant] = 0;
IntentoDeLogear[playerid] = 0; TieneBOMBA[playerid] = 0; PlayerInfo[playerid][pPointsR] = 0; PlayersChannel[playerid] = 0; strmid(PlayerInfo[playerid][jPorSalio], "Unknown", 0, strlen("Unknown"), 255); strmid(PlayerInfo[playerid][pAccent], "None", 0, strlen("None"), 255);
CuentaExistente[playerid] = 0; MascaraPuesta[playerid] = 0; Desmayado[playerid] = 0; gPlayerUsingLoopingAnim[playerid] = 0; PlayerInfo[playerid][jBengala] = 0; PlayerInfo[playerid][jVendas] = 0;
JugadorLogeado[playerid] = 0; PlayerInfo[playerid][pAdmin] = 0; PlayerInfo[playerid][jMember] = 0; PlayerInfo[playerid][pBanned] = 0; PlayerInfo[playerid][jLeader] = 0; PlayerInfo[playerid][jWalkie] = 1; PlayerInfo[playerid][jSintonia] = 0;
PlayerInfo[playerid][pWeapon] = 0; PlayerInfo[playerid][pWeapon2] = 0; PlayerInfo[playerid][pWeapon3] = 0; PlayerInfo[playerid][pWeapondura] = 0; PlayerInfo[playerid][jFosforos] = 0;
PlayerInfo[playerid][jAmmo] = 0; PlayerInfo[playerid][jAmmo3] = 0; PlayerInfo[playerid][jAmmo2] = 0; PlayerInfo[playerid][jBotella] = 0;
PlayerInfo[playerid][jTazer] = 0; PlayerInfo[playerid][jKitMed] = 0; PlayerInfo[playerid][jEdad] = 0; JustWhisp[playerid] = 0; PlayerInfo[playerid][jEncendedor] = 0;
PlayerInfo[playerid][jInfectado] = 0; PlayerInfo[playerid][jAimskill] = 0; PlayerInfo[playerid][jMechskill] = 0; PlayerInfo[playerid][jLuckskill] = 0; PlayerInfo[playerid][jZombiesPT] = 0; PlayerInfo[playerid][jSexo] = 0;
PlayerInfo[playerid][jTiempoDeCarcel] = 0; PlayerInfo[playerid][jEncarcelado] = 0; PlayerInfo[playerid][jZombie] = 0; PlayerInfo[playerid][jTutorial] = 0; PlayerInfo[playerid][jProfesion] = 0; JustOOC[playerid] = 0;
GetPlayerName(playerid, plname, sizeof(plname)); PlayerInfo[playerid][jFosforos] = 0; TieneBOMBA[playerid] = 0; LPuestos[playerid] = 0; GPuesto[playerid] = 0; PMBlockeado[playerid] = 0; TRAJE[playerid] = 0;
JustReported[playerid] = 0; Informacion[playerid][Manejando] = 0; /*Audifono[playerid] = 0;*/ PlayerNeedsHelp[playerid] = 0; JugadorListo[playerid] = 0; ConTexto[playerid] = 0; SinLeven[playerid] = 0;
format(string, sizeof(string), "TWD/accounts/%s.ini", plname);
SetPlayerVirtualWorld(playerid,0);
Timer[playerid] = SetTimerEx("Check", 100, 1, "i", playerid);
if(!IsRolePlayName(playerid))
{
SendClientMessage(playerid,0xFF0000FF, "You'll need a roleplay name before you play here. ('Firstname_Lastname')!");
Kick(playerid);
}
if(IsPlayerNPC(playerid))
{
gTeam[playerid] = EZOMBIE;
SpawnPlayer(playerid);
return 1;
}
if(fexist(string))
{
CuentaExistente[playerid] = 1;
format(string, sizeof(string), "Welcome back to The Walking Dead Roleplay!", Version);
SendClientMessage(playerid, CELESTE, string); }
else
{
CuentaExistente[playerid] = 0;
format(string, sizeof(string), "Welcome to The Walking Dead Roleplay!", Version);
SendClientMessage(playerid, CELESTE, string);
}
PlayerCount ++;
new string1[128], name[24];
GetPlayerName(playerid, name, sizeof(name));
label[playerid] = format(string1, sizeof(string), "%s",name);
Create3DTextLabel(string1,0xFFFFFFFF,name,130,0,1);
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
return 1;
}
Inside OnPlayerDisconnect:
pawn Код:
Delete3DTextLabel(label[playerid]);
Ontop:
pawn Код:
new Text3D:label[MAX_PLAYERS];