17.12.2014, 19:44
Bueno, he echo un sistema de robar casas, y bueno, cuando forzo la puerta, me abre la de LS, cuando la que quiero abirir es la de los santos, porque me pasa esto?
pawn Код:
CMD:forzar(playerid, params[])
{
//News//
new nivel = Info[playerid][pLadronc];
new string[160];
//===================================================================================//
//==============================Casa Corona==========================================//
//===================================================================================//
if(!IsPlayerInRangeOfPoint(playerid,2,1712.5415,-2099.9934,13.9541))
{
if(Info[playerid][pLevel] < 6) return SendClientMessageEx(playerid, COLOR_GRAD2, "Sуlo los usuarios mayor a nivel 6 pueden robar las casas");
if(PuertaCorona == 1) return SendClientMessage(playerid, COLOR_WHITE, "Los vecinos estбn alerta, no puedes forzar aъn.");
{
if(IsPlayerInAnyVehicle(playerid)) { SendClientMessageEx(playerid, COLOR_WHITE, "Debes estar de pie en la puerta para forzar"); return 1; }
if(nivel >= 0 && nivel <= 49)
{
//Mensajes
GameTextForPlayer(playerid, "~y~FORZANDO PUERTA",20000,3);
SendClientMessage(playerid, COLOR_WHITE, "Estбs forzando la cerradura, espera {0071FF}20 segundos");
format(string, sizeof(string), "* %s saco un martillo y comenzу a romper la puerta de la casa.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
//Variables
PuertaCorona = 1;
Info[playerid][pEstadoC] = 1;
//Sonido
PlayerPlaySound(playerid,1002,0.0,0.0,0.0);
Timer_Telefono[playerid] = SetTimerEx("Reproducir", 1000, true, "i", playerid);
//Animaciones y objetos
SetPlayerAttachedObject(playerid,4,18635,6,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
ApplyAnimation(playerid,"BASEBALL","bat_part",4.1,1,1,0,0,0);
//Timers
KillTimer(Timer_CasaCorona[playerid]); //Matar Tiempo de forzar
KillTimer(Timer_CasaCoronaAbrir[playerid]); //Matar Tiempo de forzar
Timer_CasaCoronaAbrir[playerid] = SetTimer("AbrirPuertaCorona", 1200*1000, 1); //Volver a abrir puerta
Timer_CasaCorona[playerid] = SetTimerEx("ForzandoCerraduraCoronaL1",20000,0,"i",playerid); //Tiempo forzando
}
if(nivel >= 50 && nivel <= 99)
{
//Mensajes
GameTextForPlayer(playerid, "~y~FORZANDO PUERTA",15000,3);
SendClientMessage(playerid, COLOR_WHITE, "Estбs forzando la cerradura, espera {0071FF}15 segundos");
format(string, sizeof(string), "* %s saco un martillo y comenzу a romper la puerta de la casa.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
//Variables
PuertaCorona = 1;
Info[playerid][pEstadoC] = 1;
//Sonido
PlayerPlaySound(playerid,1002,0.0,0.0,0.0);
Timer_Telefono[playerid] = SetTimerEx("Reproducir", 1000, true, "i", playerid);
//Animaciones y objetos
SetPlayerAttachedObject(playerid,4,18635,6,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
ApplyAnimation(playerid,"BASEBALL","bat_part",4.1,1,1,0,0,0);
//Timers
KillTimer(Timer_CasaCorona[playerid]); //Matar Tiempo de forzar
KillTimer(Timer_CasaCoronaAbrir[playerid]); //Matar Tiempo de forzar
Timer_CasaCoronaAbrir[playerid] = SetTimer("AbrirPuertaCorona", 1200*1000, 1); //Volver a abrir puerta
Timer_CasaCorona[playerid] = SetTimerEx("ForzandoCerraduraCoronaL2",15000,0,"i",playerid); //Tiempo forzando
}
if(nivel >= 100 && nivel <= 99999)
{
//Mensajes
GameTextForPlayer(playerid, "~y~FORZANDO PUERTA",12000,3);
SendClientMessage(playerid, COLOR_WHITE, "Estбs forzando la cerradura, espera {0071FF}12 segundos");
format(string, sizeof(string), "* %s saco un destornillador y comenzo a quitar la cerradura.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
//Variables
PuertaCorona = 1;
Info[playerid][pEstadoC] = 1;
//Sonido
PlayerPlaySound(playerid,1002,0.0,0.0,0.0);
Timer_Telefono[playerid] = SetTimerEx("Reproducir", 1000, true, "i", playerid);
//Animaciones y objetos
SetPlayerAttachedObject(playerid,4,18644, 5, 0.083000, 0.000000, -0.005000, -157.299957, -16.300003, -161.600021, 1.000000, 1.000000, 1.000000, 0, 0);
ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.1,0,0,0,0,13000,0);
//Timers
KillTimer(Timer_CasaCorona[playerid]); //Matar Tiempo de forzar
KillTimer(Timer_CasaCoronaAbrir[playerid]); //Matar Tiempo de forzar
Timer_CasaCoronaAbrir[playerid] = SetTimer("AbrirPuertaCorona", 1200*1000, 1); //Volver a abrir puerta
Timer_CasaCorona[playerid] = SetTimerEx("ForzandoCerraduraCoronaL3",12000,0,"i",playerid); //Tiempo forzando
}
}
}
//======================================================================================//
//===================================Casa Garcia========================================//
//======================================================================================//
else if(!IsPlayerInRangeOfPoint(playerid,2,-2396.2637,39.5586,35.8910))
{
if(Info[playerid][pLevel] < 6) return SendClientMessageEx(playerid, COLOR_GRAD2, "Sуlo los usuarios mayor a nivel 6 pueden robar las casas");
if(PuertaGarcia == 1) return SendClientMessage(playerid, COLOR_WHITE, "Los vecinos estбn alerta, no puedes forzar aъn.");
{
if(IsPlayerInAnyVehicle(playerid)) { SendClientMessageEx(playerid, COLOR_WHITE, "Debes estar de pie en la puerta para forzar"); return 1; }
if(nivel >= 0 && nivel <= 49)
{
//Mensajes
GameTextForPlayer(playerid, "~y~FORZANDO PUERTA",20000,3);
SendClientMessage(playerid, COLOR_WHITE, "Estбs forzando la cerradura, espera {0071FF}20 segundos");
format(string, sizeof(string), "* %s saco un martillo y comenzу a romper la puerta de la casa.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
//Variables
PuertaGarcia = 1;
Info[playerid][pEstadoC] = 1;
//Sonido
PlayerPlaySound(playerid,1002,0.0,0.0,0.0);
Timer_Telefono[playerid] = SetTimerEx("Reproducir", 1000, true, "i", playerid);
//Animaciones y objetos
SetPlayerAttachedObject(playerid,4,18635,6,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
ApplyAnimation(playerid,"BASEBALL","bat_part",4.1,1,1,0,0,0);
//Timers
KillTimer(Timer_CasaGarcia[playerid]); //Matar Tiempo de forzar
KillTimer(Timer_CasaGarciaAbrir[playerid]); //Matar Tiempo de forzar
Timer_CasaGarciaAbrir[playerid] = SetTimer("AbrirPuertaGarcia", 1200*1000, 1); //Volver a abrir puerta
Timer_CasaGarcia[playerid] = SetTimerEx("ForzandoCerraduraGarciaL1",20000,0,"i",playerid); //Tiempo forzando
}
if(nivel >= 50 && nivel <= 99)
{
//Mensajes
GameTextForPlayer(playerid, "~y~FORZANDO PUERTA",15000,3);
SendClientMessage(playerid, COLOR_WHITE, "Estбs forzando la cerradura, espera {0071FF}15 segundos");
format(string, sizeof(string), "* %s saco un martillo y comenzу a romper la puerta de la casa.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
//Variables
PuertaGarcia = 1;
Info[playerid][pEstadoC] = 1;
//Sonido
PlayerPlaySound(playerid,1002,0.0,0.0,0.0);
Timer_Telefono[playerid] = SetTimerEx("Reproducir", 1000, true, "i", playerid);
//Animaciones y objetos
SetPlayerAttachedObject(playerid,4,18635,6,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
ApplyAnimation(playerid,"BASEBALL","bat_part",4.1,1,1,0,0,0);
//Timers
KillTimer(Timer_CasaGarcia[playerid]); //Matar Tiempo de forzar
KillTimer(Timer_CasaGarciaAbrir[playerid]); //Matar Tiempo de forzar
Timer_CasaGarciaAbrir[playerid] = SetTimer("AbrirPuertaGarcia", 1200*1000, 1); //Volver a abrir puerta
Timer_CasaGarcia[playerid] = SetTimerEx("ForzandoCerraduraGarciaL2",15000,0,"i",playerid); //Tiempo forzando
}
if(nivel >= 100 && nivel <= 99999)
{
//Mensajes
GameTextForPlayer(playerid, "~y~FORZANDO PUERTA",12000,3);
SendClientMessage(playerid, COLOR_WHITE, "Estбs forzando la cerradura, espera {0071FF}12 segundos");
format(string, sizeof(string), "* %s saco un destornillador y comenzo a quitar la cerradura.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
//Variables
PuertaGarcia = 1;
Info[playerid][pEstadoC] = 1;
//Sonido
PlayerPlaySound(playerid,1002,0.0,0.0,0.0);
Timer_Telefono[playerid] = SetTimerEx("Reproducir", 1000, true, "i", playerid);
//Animaciones y objetos
SetPlayerAttachedObject(playerid,4,18644, 5, 0.083000, 0.000000, -0.005000, -157.299957, -16.300003, -161.600021, 1.000000, 1.000000, 1.000000, 0, 0);
ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.1,0,0,0,0,13000,0);
//Timers
KillTimer(Timer_CasaGarcia[playerid]); //Matar Tiempo de forzar
KillTimer(Timer_CasaGarciaAbrir[playerid]); //Matar Tiempo de forzar
Timer_CasaGarciaAbrir[playerid] = SetTimer("AbrirPuertaGarcia", 1200*1000, 1); //Volver a abrir puerta
Timer_CasaGarcia[playerid] = SetTimerEx("ForzandoCerraduraGarciaL3",12000,0,"i",playerid); //Tiempo forzando
}
}
}
return 1;
}