SA-MP Forums Archive
Do a Auto gate when i prees h - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Do a Auto gate when i prees h (/showthread.php?tid=254024)



Do a Auto gate when i prees h - marik1599 - 08.05.2011

how can i add a automatic gate when i press h and no when i write the command /opengate
Quote:

} else if ((PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16) && PlayerToPoint(15.0, playerid, 1518.4741,2773.7612,10.6719)) {//Cuneo gate
MoveDynamicObject( cuneogate, 1524.13671875, 2773.29394531, 5.34656525,1);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s uses his remore to open the gate.!", sendername);
ProxDetector(4.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
GameTextForPlayer(playerid, "~g~Opened", 5000, 3);
SetTimer("CuneoHQGateClose", 10000, false);




Re: Do a Auto gate when i prees h - TheYoungCapone - 08.05.2011

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
        if(newkeys & KEY_CROUCH)
        {
               //your code
        }
        return 1;
}



Re: Do a Auto gate when i prees h - marik1599 - 08.05.2011

which code??


Re: Do a Auto gate when i prees h - marik1599 - 08.05.2011

never mine
its working tnx your pro!!!!!