Код:
zcmd(entrar, playerid, params[])
{
if( Info[playerid][pJailed] > 0 ) return SendClientMessageEx(playerid, COLOR_WHITE, "[ERROR]: No puedes usar este comando.");
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(DDoorsInfo); i++)
{
if (IsPlayerInRangeOfPoint(playerid,3.0,DDoorsInfo[i][ddExteriorX], DDoorsInfo[i][ddExteriorY], DDoorsInfo[i][ddExteriorZ]) && Info[playerid][pVW] == DDoorsInfo[i][ddExteriorVW])
{
if(DDoorsInfo[i][ddVIP] > 0 && Info[playerid][pVIP] < DDoorsInfo[i][ddVIP])
{
SendClientMessageEx(playerid, COLOR_GRAD2, "No puedes entrar necesitas ser un mayor nivel de VIP.");
return 1;
}
if(DDoorsInfo[i][ddFamily] > 0)
{
if(Info[playerid][pFMember] != DDoorsInfo[i][ddFamily]-1)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "No puedes entrar, sуlo para miembros de la familia.");
return 1;
}
}
if(DDoorsInfo[i][ddFaction] > 0)
{
if(DDoorsInfo[i][ddFaction] >= 1 && DDoorsInfo[i][ddFaction] <= 3)
{
if(!IsACop(playerid)) return SendClientMessageEx(playerid, COLOR_GRAD2, "No puedes entrar, esta puerta estб restringida. (Sуlo Policнas)");
}
else if(DDoorsInfo[i][ddFaction] < 32 && Info[playerid][pMember] != DDoorsInfo[i][ddFaction])
{
return SendClientMessageEx(playerid, COLOR_GRAD2, "Sуlo ingreso a miembros de la facciуn.");
}
}
if(DDoorsInfo[i][ddAdmin] > 0 && Info[playerid][pAdminZC] < DDoorsInfo[i][ddAdmin])
{
return SendClientMessageEx(playerid, COLOR_GRAD2, "No puedes entrar, necesitas ser de mбs nivel administrativo.");
}
if(DDoorsInfo[i][ddWanted] > 0 && Info[playerid][pWantedLevel] != 0)
{
return SendClientMessageEx(playerid, COLOR_GRAD2, "Esta puerta esta restringida a personas con nivel de bъsqueda.");
}
if(DDoorsInfo[i][dLocked] == 1)
{
return SendClientMessageEx(playerid, COLOR_GRAD2, "Esta puerta estб bloqueada.");
}
SetPlayerInterior(playerid,DDoorsInfo[i][ddInteriorInt]);
Info[playerid][pInt] = DDoorsInfo[i][ddInteriorInt];
Info[playerid][pVW] = DDoorsInfo[i][ddInteriorVW];
SetPlayerVirtualWorld(playerid, DDoorsInfo[i][ddInteriorVW]);
if(DDoorsInfo[i][ddCustomInterior])
{
LoadObjects(playerid);
}
if(DDoorsInfo[i][ddVehicleAble] > 0 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddInteriorX],DDoorsInfo[i][ddInteriorY],DDoorsInfo[i][ddInteriorZ]);
SetVehicleZAngle(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddInteriorA]);
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddInteriorVW]);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddInteriorInt]);
}
else
{
SetPlayerPos(playerid,DDoorsInfo[i][ddInteriorX],DDoorsInfo[i][ddInteriorY],DDoorsInfo[i][ddInteriorZ]);
SetPlayerFacingAngle(playerid,DDoorsInfo[i][ddInteriorA]);
SetCameraBehindPlayer(playerid);
}
if(DDoorsInfo[i][dMusic] == 0) return 1;
else
{
switch(DDoorsInfo[i][dMusic])
{
case 1: PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=56349", 1, 1, 1, 1, 0); // Reggeaton
case 2: PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=860870", 1, 1, 1, 1, 0); // Electro
case 3: PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1377200", 1, 1, 1, 1, 0); // Techno
case 4: PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1281016", 1, 1, 1, 1, 0); // Hip hop
case 5: PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=616366", 1, 1, 1, 1, 0); // Variada
}
}
return 1;
}
}
for(new i = 0; i < sizeof(fINFO); i++)
{
if (IsPlayerInRangeOfPoint(playerid,3.0,fINFO[i][FamilyEntrance][0], fINFO[i][FamilyEntrance][1], fINFO[i][FamilyEntrance][2]))
{
LoadObjects(playerid);
SetPlayerInterior(playerid,fINFO[i][FamilyInterior]);
Info[playerid][pInt] = fINFO[i][FamilyInterior];
Info[playerid][pVW] = fINFO[i][FamilyVirtualWorld];
SetPlayerVirtualWorld(playerid, fINFO[i][FamilyVirtualWorld]);
if(fINFO[i][FamilyCustomMap])
{
LoadObjects(playerid);
}
Streamer_UpdateEx(playerid, fINFO[i][FamilyExit][0],fINFO[i][FamilyExit][1],fINFO[i][FamilyExit][2]);
SetPlayerPos(playerid,fINFO[i][FamilyExit][0],fINFO[i][FamilyExit][1],fINFO[i][FamilyExit][2]);
SetPlayerFacingAngle(playerid,fINFO[i][FamilyExit][3]);
return 1;
}
}
if (IsPlayerInRangeOfPoint(playerid,3,2281.1748,-1724.4528,13.2521)) // GARAGE 1
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
SetVehiclePos(GetPlayerVehicleID(playerid), 2233.9280,-1758.3882,2031.3885);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 11.4);
Streamer_Update(playerid);
}
else{
SetPlayerPos(playerid, 2235.1851,-1763.5916,2032.9728);
SetPlayerFacingAngle(playerid, 14.9);
SetCameraBehindPlayer(playerid);
LoadObjects(playerid);
}
return 1;
}
if (IsPlayerInRangeOfPoint(playerid,3,1242.2382,-1732.4800,13.2911)) // GARAGE 2
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
SetVehiclePos(GetPlayerVehicleID(playerid), 1134.0381,-1591.4459,6602.5879);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 176.3030);
Streamer_Update(playerid);
}
else{
SetPlayerPos(playerid, 1134.0381,-1591.4459,6602.5879);
SetPlayerFacingAngle(playerid, 14.9);
SetCameraBehindPlayer(playerid);
LoadObjects(playerid);
}
return 1;
}
if (IsPlayerInRangeOfPoint(playerid,3,853.3862,-1387.1884,13.7470)) // GARAGE VIP
{
if(Info[playerid][pVIP] == 0) return GameTextForPlayer(playerid, "~r~No eres VIP", 2000, 4);
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), 855.6053,-1412.6117,4202.1577);
SetVehicleZAngle(GetPlayerVehicleID(playerid), NORTE);
Streamer_Update(playerid);
}
else{
SetPlayerPos(playerid, 855.6053,-1412.6117,4202.1577);
SetPlayerFacingAngle(playerid, NORTE);
SetCameraBehindPlayer(playerid);
LoadObjects(playerid);
}
return 1;
}
for(new i = 0; i < sizeof(HouseInfo); i++){
if (IsPlayerInRangeOfPoint(playerid,3,HouseInfo[i][hExteriorX], HouseInfo[i][hExteriorY], HouseInfo[i][hExteriorZ])){
if(Info[playerid][pPhousekey] == i || Info[playerid][pPhousekey2] == i || HouseInfo[i][hLock] == 0 || Info[playerid][pRenting] == i){
LoadObjects(playerid);
SetPlayerInterior(playerid,HouseInfo[i][hHInteriorWorld]);
Info[playerid][pInt] = HouseInfo[i][hHInteriorWorld];
Info[playerid][pVW] = i+6000;
SetPlayerVirtualWorld(playerid, i+6000);
if(HouseInfo[i][hCustomInterior] == 1){
LoadObjects(playerid);
}
SetPlayerPos(playerid,HouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ]);
SetPlayerFacingAngle(playerid,HouseInfo[i][hInteriorA]);
SetCameraBehindPlayer(playerid);
GameTextForPlayer(playerid, "~w~Bienvenido", 5000, 1);
Streamer_UpdateEx(playerid, HouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ]);
}
else
{
GameTextForPlayer(playerid, "~r~Cerrado", 5000, 1);
}
return 1;
}
}
}
return 1;
}