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] = ZOMBIE;
}
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] = ZOMBIE;
}
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] = ZOMBIE;
}
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] = HUMAN;
}
else
{
new which_spawn = random(4);
switch(which_spawn)
{
case 0:
{
SetPlayerSkin(playerid, 162);
SetPlayerPos(playerid,1138.4512,-1385.9067,13.7797);
SetPlayerInterior(playerid,0);
TogglePlayerControllable(playerid, true);
}
case 1:
{
SetPlayerSkin(playerid, 162);
SetPlayerPos(playerid,1543.7426,-1305.9878,16.1152);
SetPlayerInterior(playerid,0);
TogglePlayerControllable(playerid, true);
}
case 2:
{
SetPlayerSkin(playerid, 162);
SetPlayerPos(playerid,2578.9900,-1412.2079,24.461;
SetPlayerInterior(playerid,0);
TogglePlayerControllable(playerid, true);
}
case 3:
{
SetPlayerSkin(playerid, 162);
SetPlayerPos(playerid,2578.9900,-1412.2079,24.461;
SetPlayerInterior(playerid,0);
TogglePlayerControllable(playerid, true);
}
}
}
return 1;
}
/* */
GangZoneShowForPlayer(playerid, GangLavaAutos, BLANCO2);
GangZoneShowForPlayer(playerid, GangProstibulo, BLANCO2);
GangZoneShowForPlayer(playerid, GangGroveMuerta, BLANCO2);
GangZoneShowForPlayer(playerid, GangZombiesBajos, BLANCO2);
GangZoneShowForPlayer(playerid, GangViejoMotel, BLANCO2);
GangZoneShowForPlayer(playerid, GangGlenMuerte, BLANCO2);
GangZoneShowForPlayer(playerid, GangSkatePark, BLANCO2);
GangZoneShowForPlayer(playerid, GangMedicinaZombie, BLANCO2);
GangZoneShowForPlayer(playerid, Gangidlewood1, BLANCO2);
GangZoneShowForPlayer(playerid, gangidlewood2, BLANCO2);
GangZoneShowForPlayer(playerid, Gangidlewood3, BLANCO2);
GangZoneShowForPlayer(playerid, GangUnity, BLANCO2);
GangZoneShowForPlayer(playerid, GangCoronaCaida, BLANCO2);
GangZoneShowForPlayer(playerid, GangComisarialoscaidos, BLANCO2);
GangZoneShowForPlayer(playerid, GangZonaConspir, BLANCO2);
GangZoneShowForPlayer(playerid, GangVinewood, BLANCO2);
GangZoneShowForPlayer(playerid, GangNatural, BLANCO2);
GangZoneShowForPlayer(playerid, GangNoNatural, BLANCO2);
GangZoneShowForPlayer(playerid, GangSantoMuertoBeach, BLANCO2);
GangZoneShowForPlayer(playerid, GangPuntoMuerto, BLANCO2);
TextDrawShowForPlayer(playerid, Condition[playerid]);
TextDrawShowForPlayer(playerid, Zones[playerid]);
TextDrawShowForPlayer(playerid, Zones2[playerid]);
TextDrawShowForPlayer(playerid, Textdraw0[playerid]);
TextDrawShowForPlayer(playerid, Textdraw1[playerid]);
if(IsPlayerAttachedObjectSlotUsed(playerid, 0)) RemovePlayerAttachedObject(playerid, 0);
if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
if(IsPlayerAttachedObjectSlotUsed(playerid, 2)) RemovePlayerAttachedObject(playerid, 2);
if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
if(IsPlayerAttachedObjectSlotUsed(playerid, 4)) RemovePlayerAttachedObject(playerid, 4);
if(IsPlayerAttachedObjectSlotUsed(playerid, 5)) RemovePlayerAttachedObject(playerid, 5);
RemovePlayerAttachedObject(playerid,0);
PlayerInfo[playerid][jZombieC] = 1;
LPuestos[playerid] = 0;
GPuesto[playerid] = 0;
ConTexto[playerid] = 0;
AntiDeAMX();
/* */
/*TextDrawShowForPlayer(playerid,Dinero[playerid]);*/
new tmphour;
new tmpminute;
new tmpsecond;
gettime(tmphour, tmpminute, tmpsecond);
if (realtime)
{
SetWorldTime(tmphour);
}
PlayerPlaySound(playerid, 1069, 0.0, 0.0, 0.0);
SetPlayerDrunkLevel(playerid, 0);
if(PlayerInfo[playerid][jEstiloPelea] == 1)
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
}
else if(PlayerInfo[playerid][jEstiloPelea] == 2)
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
}
else if(PlayerInfo[playerid][jEstiloPelea] == 3)
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
}
if(PlayerInfo[playerid][jArma] != 0)
{
GivePlayerWeapon(playerid, PlayerInfo[playerid][jArma], PlayerInfo[playerid][jMunicion]);
}
if(PlayerInfo[playerid][jArma2] != 0)
{
GivePlayerWeapon(playerid, PlayerInfo[playerid][jArma2], PlayerInfo[playerid][jMunicion2]);
}
if(PlayerInfo[playerid][jArma3] != 0)
{
GivePlayerWeapon(playerid, PlayerInfo[playerid][jArma3], PlayerInfo[playerid][jMunicion3]);
}
if(PlayerInfo[playerid][jSpawn] == 1)
{
new which_spawn = random(4);
if(which_spawn == 0)
{
if(gTeam[playerid] == HUMAN)
{
SetPlayerPos(playerid,815.0766,-1094.3162,25.7895);
SetPlayerInterior(playerid,0);
SetPlayerWeather(playerid,ClimaDefault);
SetPlayerSkin(playerid,PlayerInfo[playerid][jRopa]);
}
else if(gTeam[playerid] == ZOMBIE)
{
SetPlayerPos(playerid,1138.4512,-1385.9067,13.7797);
SetPlayerInterior(playerid,0);
SetPlayerWeather(playerid, ClimaDefault);
new rnd = random(sizeof(ZombieSkin));
SetPlayerSkin(playerid, ZombieSkin[rnd][0]);
}
}
else if(which_spawn == 1)
{
if(gTeam[playerid] == HUMAN)
{
SetPlayerPos(playerid,1134.1107,-1488.0193,22.7690);
SetPlayerInterior(playerid,0);
SetPlayerWeather(playerid, ClimaDefault);
SetPlayerSkin(playerid,PlayerInfo[playerid][jRopa]);
}
else if(gTeam[playerid] == ZOMBIE)
{
SetPlayerPos(playerid,1543.7426,-1305.9878,16.1152);
SetPlayerInterior(playerid,0);
SetPlayerWeather(playerid, ClimaDefault);
new rnd = random(sizeof(ZombieSkin));
SetPlayerSkin(playerid, ZombieSkin[rnd][0]);
}
}
else if(which_spawn == 2)
{
if(gTeam[playerid] == HUMAN)
{
SetPlayerPos(playerid,2509.9282,-1472.3695,24.0294);
SetPlayerInterior(playerid,0);
SetPlayerWeather(playerid, ClimaDefault);
SetPlayerSkin(playerid,PlayerInfo[playerid][jRopa]);
}
else if(gTeam[playerid] == ZOMBIE)
{
SetPlayerPos(playerid,2578.9900,-1412.2079,24.461;
SetPlayerInterior(playerid,0);
SetPlayerWeather(playerid, ClimaDefault);
new rnd = random(sizeof(ZombieSkin));
SetPlayerSkin(playerid, ZombieSkin[rnd][0]);
}
}
else if(which_spawn == 3)
{
if(gTeam[playerid] == HUMAN)
{
SetPlayerPos(playerid,1593.0189,-1203.7548,19.8659);
SetPlayerInterior(playerid,0);
SetPlayerWeather(playerid, ClimaDefault);
SetPlayerSkin(playerid,PlayerInfo[playerid][jRopa]);
}
else if(gTeam[playerid] == ZOMBIE)
{
SetPlayerPos(playerid,2578.9900,-1412.2079,24.461;
SetPlayerInterior(playerid,0);
SetPlayerWeather(playerid, ClimaDefault);
new rnd = random(sizeof(ZombieSkin));
SetPlayerSkin(playerid, ZombieSkin[rnd][0]);
}
}
if(PlayerInfo[playerid][jInfected] >= 1)
{
SafeSetPlayerPos(playerid,PlayerInfo[playerid][jPos_x],PlayerInfo[playerid][jPos_y],PlayerInfo[playerid][jPos_z]);
ZombieTeam(playerid);
new rnd = random(sizeof(ZombieSkin));
SetPlayerSkin(playerid, ZombieSkin[rnd][0]);
PlayerInfo[playerid][jInfected] = 0;
PlayerInfo[playerid][jZombie] = 1;
TogglePlayerControllable(playerid, 1);
}
else if(PlayerInfo[playerid][jInfected] == 0 && PlayerInfo[playerid][jZombie] == 0)
{
SafeSetPlayerPos(playerid,PlayerInfo[playerid][jPos_x],PlayerInfo[playerid][jPos_y],PlayerInfo[playerid][jPos_z]);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
SetPlayerSkin(playerid, PlayerInfo[playerid][jRopa]);
SetTimerEx("Desmayar", 2000, 0, "d", playerid);
}
/*else if(PlayerInfo[playerid][jLider] == 1)
{
SetPlayerPos(playerid,225.6344,1909.2631,17.6406);
Militar(playerid);
}
else if(PlayerInfo[playerid][jLider] == 2)
{
TogglePlayerControllable(playerid,0);
SetTimerEx("Desfrizear", 6000, 0, "d", playerid);
SetPlayerPos(playerid,1833.8231,-1299.1377,22.2039);
Conspirador(playerid);
}
else if(PlayerInfo[playerid][jMiembro] == 3)
{
SetPlayerPos(playerid,2759.2126,-2436.4126,13.5050);
Militar(playerid);
}
else if(PlayerInfo[playerid][jMiembro] == 2)
{
TogglePlayerControllable(playerid,0);
SetTimerEx("Desfrizear", 6000, 0, "d", playerid);
SetPlayerPos(playerid,1833.8231,-1299.1377,22.2039);
Conspirador(playerid);
}
else if(PlayerInfo[playerid][jMiembro] == 1)
{
SetPlayerPos(playerid,110.2537,1901.6782,10.0955);
Militar(playerid);
}*/
}
else if(PlayerInfo[playerid][jSpawn] == 0)
{
if(PlayerInfo[playerid][jEncarcelado] == 0)
{
SafeSetPlayerInterior(playerid,PlayerInfo[playerid][jInt]);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][jPos_x],PlayerInfo[playerid][jPos_y],PlayerInfo[playerid][jPos_z]);
SetPlayerHealth(playerid,PlayerInfo[playerid][jVida]);
SetPlayerSkin(playerid,PlayerInfo[playerid][jRopa]);
SetPlayerArmour(playerid,PlayerInfo[playerid][jArmadura]);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][jSpawn] = 1;
return 1;
}
else if(PlayerInfo[playerid][jEncarcelado] >= 1)
{
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 2448.2351,-1977.7130,13.593;
SendClientMessage(playerid, ROJO_OSCURO, "Tu condena no ha terminado!.");
SetPlayerSkin(playerid,PlayerInfo[playerid][jRopa]);
return 1;
}
}
return 1;
}
|