07.07.2013, 10:18
I'm experiencing a problem with the KEY_SECONDARY_ATTACK. When I press ENTER, it should open the door, nothing happens. Why? Here is the code
Sorry my bad english i'm Italian.
Sorry my bad english i'm Italian.
pawn Код:
else if(newkeys == KEY_SECONDARY_ATTACK)//NON FUNZIONA!!!
{
new Float:cx, Float:cy, Float:cz;
GetPlayerPos(playerid, cx, cy, cz);
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3)
{
if (PlayerToPointStripped(5, playerid,245.0578,72.4314,1002.5406,cx,cy,cz))
{
if (portacentrale == 1)
{
portacentrale = 0;
MoveDynamicObject(lspddoor1, 244.0578,72.4314,1002.5406, 3.5000);
MoveDynamicObject(lspddoor2, 247.1478,72.4314,1002.5406, 3.5000);
SendClientMessage(playerid, COLOR_BLUE,"La porta и aperta, chiudila per favore!");
format(string, sizeof(string), "* %s apre la porta della centrale.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
MoveDynamicObject(lspddoor1, 245.0578,72.4314,1002.5406, 3.5000);
MoveDynamicObject(lspddoor2, 245.9478,72.4314,1002.5406, 3.5000);
SendClientMessage(playerid, COLOR_BLUE,"Porta della centrale chiusa!");
format(string, sizeof(string), "* %s chiude la porta della centrale.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
portacentrale = 1;
}
}
}
}