this is not open
#1

Hello friends, I have this to open the c key but does not open the gate does not move...

I pass the lines I have q

OnDialogResponse

if(listitem == 10)
{
if(PlayerInfo[playerid][EsPremiun] == 1)
{
if(EstaAbierto == 0)
{
if(PlayerInfo[playerid][LlaveP] >= 1)
{
if(IsPlayerInRangeOfPoint(playerid,2.3,1733.8979,-1341.2412,15.5724))
{
EstaAbierto = 1;
new RandomLlave = random(3);
if(RandomLlave == 1)
{
PlayerInfo[playerid][LlaveP] = 0;
MoveObject(PuertaPremiun,1741.949,-1341.787,16.470,6.2);
format(string, sizeof(string), "* %s abre la puerta con la llave de simbolo extraсo pero esta se rompe.", NombreEx(playerid));
MensajeCercaDe(15.0, playerid, string, 0xFFA200FF,0xFFA200FF,0xFFA200FF,0xFFA200FF,0xFFA2 00FF);
SendClientMessage(playerid, 0xFF0000FF, "Tu llave se rompio. Ahora no podras cerrar la puerta!");
return 1;
}
else if(RandomLlave == 0 || RandomLlave == 2)
{
MoveObject(PuertaPremiun,1741.949,-1341.787,16.470,6.2);
format(string, sizeof(string), "* %s abre la puerta con la llave de simbolo extraсo.", NombreEx(playerid));
MensajeCercaDe(15.0, playerid, string, 0xFFA200FF,0xFFA200FF,0xFFA200FF,0xFFA200FF,0xFFA2 00FF);
return 1;
}
}
}
}
}
}

in OnPlayerKeyStateChange

if(PRESSED(KEY_CROUCH))
{
if(PlayerInfo[playerid][EsPremiun] == 1 && PlayerInfo[playerid][LlaveP] >= 1)
{
if(IsPlayerInRangeOfPoint(playerid,9.0,1738.4265,-1342.3175,15.767)
{
if(EstaAbierto == 1)
{
EstaAbierto = 0;
MoveObject(PuertaPremiun,1737.402,-1341.772,221.468,10.0);
format(string, sizeof(string), "* %s cierra la puerta con la llave extraсa.", NombreEx(playerid));
MensajeCercaDe(15.0, playerid, string, 0xFFA200FF,0xFFA200FF,0xFFA200FF,0xFFA200FF,0xFFA2 00FF);
return 1;
}
}
}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)