Nu numai ca se deschide la comanda /deschide, ci si la toate 'comenzile' atat existente, cat si inexistente.
Daca vrei sa se deschida atunci cand o tasta ( VK_SAMP_KEY_AVAIBLE ) este folosita, atunci bagi codul asta la OnPlayerKeyStateChange, si ii mai pui conditia asta: if(newkeys & (APASA AICI PENTRU ID-UL TASTEI))
Uite un exemplu:
if(IsPlayerInRangeOfPoint(playerid, range , x , y , z ) && (newkeys & KEY_FIRE))
{
if(IsACop(playerid))
{
MoveObject(poartapd,1596.77136200,-1637.92077600,15.07157900, 5);
SetTimerEx("GateClosse", 5000, 0, "", playerid); //5 secunde , nu se repeta, valoarea este integer pt playerid
return 1;
}
} Iar acest lucru: SetTimerEx("GateClosse", 5000, 0, "", playerid); //5 secunde , nu se repeta, valoarea este integer pt playerid, este cea mai mare prostie pe care am auzit-o. De aceea, te-as ruga sa postezi antetul functiei GateClosse.