30.12.2011, 23:00
Hola, tengo el siguiente codigo para mover una reja:
Forwards:
Comando:
Publics:
Anda todo perfecto, pero el problema es que cuando escribes /aplspd para abrir la reja se abre pero girando, y queda toda deforme :P Y se cierra automaticamente por el timer perfectamente, pero no puedo entender porque se abre girando :S
Alguien sabe que puede estar pasando? Gracias por su ayuda
Forwards:
pawn Код:
forward GateClose5();
forward GateClose(playerid);
pawn Код:
if (strcmp(cmdtext, "/aplspd", true) == 0) //Porton police ls
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if (PlayerToPoint(10, playerid,1589.053344,-1638.123168,14.122960))
{
MoveDynamicObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.8);
format(string, sizeof(string), "* %s Saca su control remoto del bolsillo y abre la reja", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
SetTimer("GateClose", 9000, 0);
return 1;
}
else if (PlayerToPoint(15, playerid,1545.7398681641, -1627.7280273438, 15.206203460693))
{
MoveDynamicObject(pdgate2,1545.7392578125, -1627.7275390625, 20.381204605103, 0.8);
format(string, sizeof(string), "* %s saca su control remoto y abre la reja principal", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetTimer("GateClose5", 9000, 0);
return 1;
}
}
else return SendClientMessage(playerid, COLOR_GREY,"Usted no tiene un mando a distancia.");
return 1;
}
pawn Код:
public GateClose5()
{
MoveDynamicObject(pdgate2, 1545.7398681641, -1627.7280273438, 15.206203460693, 0.97);
return 1;
}
public GateClose(playerid)
{
MoveDynamicObject(pdgate1,1589.053344,-1638.123168,14.122960, 0.97);
PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
return 1;
}
Anda todo perfecto, pero el problema es que cuando escribes /aplspd para abrir la reja se abre pero girando, y queda toda deforme :P Y se cierra automaticamente por el timer perfectamente, pero no puedo entender porque se abre girando :S
Alguien sabe que puede estar pasando? Gracias por su ayuda
