18.12.2012, 18:54
hello whats wrong in this code?
it gives me erros
i wanna when player make /gate open gate and when he make /gate again close it
Help pls!
it gives me erros
i wanna when player make /gate open gate and when he make /gate again close it
Help pls!
Code:
#include <a_samp> new IsGateOpen; //House Gate public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (newkeys && /gate) { new name[24]; GetPlayerName(playerid, name,sizeof(name)); if (strcmp(name, "Callum_Teller",true) == 0) { if (IsGateOpen == 0) { MoveObject(971, 263.6000061, -1333.8000488, 55.5999985, 0.00, 0.00, 34.0000000); IsGateOpen = 1; return 1; } if (IsGateOpen == 1) { MoveObject(971, 263.6000061, -1333.8000488, 46.0000000, 0.00, 0.00, 34.0000000); IsGateOpen = 0; return 1; } } } return 1; }