25.01.2020, 13:13
I try to make a system where when you press the "enter" key in a certain area you will be teleported inside. I made the code, but something is not right, because when I press enter at that location, nothing happens.
Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(IsPlayerInRangeOfPoint(playerid, 10, 1219.9609,-1811.9579,16.5938)) { if(newkeys == KEY_SECONDARY_ATTACK) { if(GetPlayerInterior(playerid)==0 && GetPlayerVirtualWorld(playerid)==0) { SetPlayerInterior(playerid,3); SetPlayerPos(playerid, 1494.325195,1304.942871,1093.289062); } } } return 1; }