27.07.2015, 10:34
Hi,
I've made a movable gate and i want to open it with keypad and password.
When i enter /go in game,i see the keypad and when i enter the password, gate opens but it opens with wrong password too.
I think it has alot of mistakes.
I've made a movable gate and i want to open it with keypad and password.
Код:
#define KEYPAD_GATE 1 new var = 4284; new MyKey[5];
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/go", cmdtext, true, 10) == 0) { if(IsPlayerInRangeOfPoint(playerid, 10, 164.2189,-1945.5867,3.7734)) { valstr(MyKey,var); ShowPlayerKeypad(playerid, KEYPAD_GATE, MyKey); } return 1; }
Код:
public OnPlayerKeypadInput(playerid, keypadID, type, key) { if(!strcmp(GetPlayerKeypad(KEYPAD_GATE), "4284")) { MoveObject(housegate, 164.53700, -1945.84595, 1.01000, 3, 0, 0, -57); //////////LS Beach House/////// } return 1; }
I think it has alot of mistakes.
