30.01.2015, 08:47
So i tried to make entrances with [Enter] key , but it's just doesn't work .
Here is my whole OnPlayerKeyStateChange callback .
Here is my whole OnPlayerKeyStateChange callback .
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(GetPVarInt(playerid, "Injured") != 0) return 0; if(!gPlayerUsingLoopingAnim[playerid]) return 0; if(IsKeyJustDown(KEY_SPRINT,newkeys,oldkeys)) { StopLoopingAnim(playerid); TextDrawHideForPlayer(playerid,txtAnimHelper); return 1; } if((newkeys & KEY_JUMP) && !IsPlayerInAnyVehicle(playerid)) { bunnyhop1[playerid] ++; SetTimerEx("bunnyhop3", 14000, false, "i", playerid); if(bunnyhop1[playerid] == 2) { ApplyAnimation(playerid, "PED", "BIKE_fall_off", 4.1, 0, 1, 1, 1, 0, 1); SetTimerEx("bunnyhop2", 5000, false, "i", playerid); return 1; } } //entrances if (newkeys & KEY_SECONDARY_ATTACK) { if(PlayerToPoint(2,playerid,137.1711,1446.1860,11.1372)) { SetPlayerPos(playerid,1809.8553,-1548.7037,5700.4287); return 1; } if(PlayerToPoint(2,playerid,1809.8553,-1548.7037,5700.4287)) { SetPlayerPos(playerid,137.1711,1446.1860,11.1372); return 1; } if(PlayerToPoint(2,playerid,200.2337,1400.4672,10.5859)) { SetPlayerPos(playerid,772.1120,-3.8986,1000.7288); SetPlayerInterior(playerid, 5); return 1; } if(PlayerToPoint(2,playerid,772.1120,-3.8986,1000.7288)) { SetPlayerPos(playerid,200.2337,1400.4672,10.5859); SetPlayerInterior(playerid, 0); return 1; } if(PlayerToPoint(2,playerid,207.1110,1347.5542,10.5859)) { SetPlayerPos(playerid,246.06038, 1386.54834, -15.22439); return 1; } if(PlayerToPoint(2,playerid,246.06038, 1386.54834, -15.22439)) { SetPlayerPos(playerid,207.1110,1347.5542,10.5859); SetPlayerInterior(playerid, 0); return 1; } } return 1; }