12.01.2012, 21:53
Hey,
ls_elevator.pwn(209) : error 017: undefined symbol "KEY_YES"
ls_elevator.pwn(209) : error 017: undefined symbol "KEY_YES"
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(!IsPlayerInAnyVehicle(playerid) && (newkeys & KEY_YES)) { new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]); if(pos[1] < -1301.4 && pos[1] > -1303.2417 && pos[0] < 1786.2131 && pos[0] > 1784.1555) // He is using the elevator button ShowElevatorDialog(playerid); else // Is he in a floor button? { if(pos[1] > -1301.4 && pos[1] < -1299.1447 && pos[0] < 1785.6147 && pos[0] > 1781.9902) { // He is most likely using it, check floor: new i=20; while(pos[2] < GetDoorsZCoordForFloor(i) + 3.5 && i > 0) i --; if(i == 0 && pos[2] < GetDoorsZCoordForFloor(0) + 2.0) i = -1; if(i <= 19) { CallElevator(playerid, i + 1); GameTextForPlayer(playerid, "~r~Asansor Cagriliyor", 3500, 4); } } } } return 1; }