public OnPlayerConnect(playerid)
{
new plname[MAX_PLAYER_NAME];
new sstring[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
if(strfind(pName, "_", true) == -1)
{
format(sstring, 128, "Tu nombre no cumple el formato Nombre_Apellido.");
SendClientMessage(playerid,ROJO, sstring);
Kick(playerid);
return 1;
}
new string[128];
IntentarTimmer[playerid] = 0; Registrando[playerid] = 0; Orejon[playerid] = 0; VHabGolpeo[playerid] = 0; AFK[playerid] = 0; AdminDuty[playerid] = 0;
ResetearArmas(playerid); JugadorInfo[playerid][jSpawn] = 0; JugadorInfo[playerid][jInt] = 0; HelpMessages[playerid] = 0; JugadorInfo[playerid][jRopa] = 0; JugadorInfo[playerid][jTyrant] = 0;
IntentoDeLogear[playerid] = 0; TieneBOMBA[playerid] = 0; JugadorInfo[playerid][jPuntosR] = 0; PlayersChannel[playerid] = 0; strmid(JugadorInfo[playerid][jPorSalio], "Unknown", 0, strlen("Unknown"), 255);
CuentaExistente[playerid] = 0; MascaraPuesta[playerid] = 0; Desmayado[playerid] = 0; gPlayerUsingLoopingAnim[playerid] = 0; JugadorInfo[playerid][jBengala] = 0; JugadorInfo[playerid][jVendas] = 0;
JugadorLogeado[playerid] = 0; JugadorInfo[playerid][jAdmin] = 0; JugadorInfo[playerid][jMiembro] = 0; JugadorInfo[playerid][jBaneado] = 0; JugadorInfo[playerid][jLider] = 0; JugadorInfo[playerid][jWalkie] = 0; JugadorInfo[playerid][jSintonia] = 0;
JugadorInfo[playerid][jArma] = 0; JugadorInfo[playerid][jArma2] = 0; JugadorInfo[playerid][jArma3] = 0; JugadorInfo[playerid][jArmadura] = 0; JugadorInfo[playerid][jFosforos] = 0;
JugadorInfo[playerid][jMunicion] = 0; JugadorInfo[playerid][jMunicion3] = 0; JugadorInfo[playerid][jMunicion2] = 0; JugadorInfo[playerid][jBotella] = 0;
JugadorInfo[playerid][jTazer] = 0; JugadorInfo[playerid][jKitMed] = 0; JugadorInfo[playerid][jEdad] = 0; JustWhisp[playerid] = 0; JugadorInfo[playerid][jEncendedor] = 0;
JugadorInfo[playerid][jInfectado] = 0; JugadorInfo[playerid][jPunteria] = 0; JugadorInfo[playerid][jMecanica] = 0; JugadorInfo[playerid][jSuerte] = 0; JugadorInfo[playerid][jZombiesPT] = 0; JugadorInfo[playerid][jSexo] = 0;
JugadorInfo[playerid][jTiempoDeCarcel] = 0; JugadorInfo[playerid][jEncarcelado] = 0; JugadorInfo[playerid][jZombie] = 0; JugadorInfo[playerid][jTutorial] = 0; JugadorInfo[playerid][jProfesion] = 0; JustOOC[playerid] = 0;
GetPlayerName(playerid, plname, sizeof(plname)); JugadorInfo[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), "RZRP/Cuentas/%s.ini", plname);
SetPlayerVirtualWorld(playerid,0);
Timer[playerid] = SetTimerEx("Check", 100, 1, "i", playerid);
if(IsPlayerNPC(playerid))
{
gTeam[playerid] = EZOMBIE;
SpawnPlayer(playerid);
return 1;
}
if(fexist(string))
{
CuentaExistente[playerid] = 1;
format(string, sizeof(string), "Bienvenido a Still Alive - Zombie Roleplay, corriendo en %s BETA", Version);
SendClientMessage(playerid, CELESTE, string); }
else
{
CuentaExistente[playerid] = 0;
format(string, sizeof(string), "Bienvenido a Still Alive - Zombie Roleplay, corriendo en %s BETA", Version);
SendClientMessage(playerid, CELESTE, string);
}
PlayerCount ++;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new textreason[64];
new plname[24];
new string2[128];
GetPlayerName(playerid, plname, sizeof(plname));
new playersip[24];
GetPlayerIp(playerid, playersip, sizeof(playersip));
Delete3DTextLabel(Text3D:YO[playerid]);
Delete3DTextLabel(Text3D:AMB[playerid]);
TextDrawDestroy(Textdraw52[playerid]);
JugadorInfo[playerid][jSpawn] = 0;
UpdatePlayerPosition(playerid);
KillTimer(Timer[playerid]);
KillTimer(Choque[playerid]);
Informacion[playerid][Manejando] = 0;
if(reason == 0)
{
textreason = "Crashed";
strmid(JugadorInfo[playerid][jPorSalio], "Crashed", 0, strlen("Crashed"), 255);
format(string2, sizeof(string2),"[SA-ZR]: %s salio del server. [%s]",plname, textreason);
MandarMensajeCercano(30.0, playerid, string2, VERDE,VERDE,VERDE,VERDE,VERDE);
UpdatePlayerPosition(playerid);
JugadorInfo[playerid][jSpawn] = 0;
}
else if(reason == 1)
{
textreason = "Voluntad";
strmid(JugadorInfo[playerid][jPorSalio], "Voluntad", 0, strlen("Voluntad"), 255);
format(string2, sizeof(string2),"[SA-ZR]: %s salio del server. [%s]",plname, textreason);
MandarMensajeCercano(30.0, playerid, string2, VERDE,VERDE,VERDE,VERDE,VERDE);
UpdatePlayerPosition(playerid);
JugadorInfo[playerid][jSpawn] = 0;
}
else if(reason == 2)
{
strmid(JugadorInfo[playerid][jPorSalio], "Kicked/Banned", 0, strlen("Kicked/Banned"), 255);
UpdatePlayerPosition(playerid);
JugadorInfo[playerid][jSpawn] = 0;
}
for(new slot = 2; slot != 12; slot++)
{
new wep, ammo;
GetPlayerWeaponData(playerid, slot, wep, ammo);
if(wep != 0 && ammo != 0)
{
if(gTeam[playerid] == EHUMANO)
{
if(JugadorInfo[playerid][jArma] == 0)
{
JugadorInfo[playerid][jArma] = wep; JugadorInfo[playerid][jMunicion] = ammo;
JugadorInfo[playerid][jArma2] = wep; JugadorInfo[playerid][jMunicion2] = ammo;
JugadorInfo[playerid][jArma3] = wep; JugadorInfo[playerid][jMunicion3] = ammo;
}
}
}
}
GuardarInfo(playerid);
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "Zombie_1", true))
{
SetPlayerSkin(playerid, 162);
SetPlayerPos(playerid, 1776.4562,-1895.7217,13.3867);
TogglePlayerControllable(playerid, true);
SetPlayerColor(playerid, BLANCO2);
gTeam[playerid] = EZOMBIE;
}
if(!strcmp(npcname, "Zombie_2", true))
{
SetPlayerSkin(playerid, 162);
SetPlayerPos(playerid, 1507.4354,-1730.9388,13.382
;
TogglePlayerControllable(playerid, true);
SetPlayerColor(playerid, BLANCO2);
gTeam[playerid] = EZOMBIE;
}
if(!strcmp(npcname, "Zombie_3", true))
{
SetPlayerSkin(playerid, 162);
SetPlayerPos(playerid, 1776.4562,-1895.7217,13.3867);
TogglePlayerControllable(playerid, true);
SetPlayerColor(playerid, BLANCO2);
gTeam[playerid] = EZOMBIE;
}
if(!strcmp(npcname,"Bot_intro",true))
{
PutPlayerInVehicle(playerid,63, 0);
new coche = GetPlayerVehicleID(playerid);
SetVehicleParamsEx(coche, 1, 0, -1, 0, 0, 0, 0);
TogglePlayerControllable(playerid, true);
SetPlayerColor(playerid, BLANCO2);
gTeam[playerid] = EHUMANO;
}
else
{
new which_spawn = random(4);
if(which_spawn == 0)
{
SetPlayerSkin(playerid, 162);
SetPlayerPos(playerid,1138.4512,-1385.9067,13.7797);
SetPlayerInterior(playerid,0);
TogglePlayerControllable(playerid, true);
}
else if(which_spawn == 1)
{
SetPlayerSkin(playerid, 162);
SetPlayerPos(playerid,1543.7426,-1305.9878,16.1152);
SetPlayerInterior(playerid,0);
TogglePlayerControllable(playerid, true);
}
else if(which_spawn == 2)
{
SetPlayerSkin(playerid, 162);
SetPlayerPos(playerid,2578.9900,-1412.2079,24.461
;
SetPlayerInterior(playerid,0);
TogglePlayerControllable(playerid, true);
}
else if(which_spawn == 3)
{
SetPlayerSkin(playerid, 162);
SetPlayerPos(playerid,2578.9900,-1412.2079,24.461
;
SetPlayerInterior(playerid,0);
TogglePlayerControllable(playerid, true);
}
}
return 1;
Й isso ? penso que copiei demais