08.07.2011, 20:54
if you want your gates open when you press a key then you have to put your codes under this function
il make you a example:
oh and here you can get the button id-s https://sampwiki.blast.hk/wiki/GetPlayerKeys
its pretty easy, just the function needs to be scripted better, it was just given for an example, you have to change to your likings.
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { return 1; }
oh and here you can get the button id-s https://sampwiki.blast.hk/wiki/GetPlayerKeys
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_SPRINT) // Sprint key, when you want you character run faster { if(gate==0) { gate = 1; MoveObject(gatename, 1588.965698, -1637.882690, 7.710285, 1.50); } else if(gate==1) { gate= 0; MoveObject(gatename, 1588.965698, -1637.882690, 15.260185, 1.50); } } return 1; }