29.07.2011, 23:35
I want to know why this code aint working. I tried to make it with KEY_CROUCH and KEY_JUMP but it's still not working.
Code:
if(newkeys & KEY_UP) { if (PlayerToPoint(4, playerid,2355.8599,224.8270,25.8024)) { if (GetPlayerState(playerid) == 2) { new tmpcar = GetPlayerVehicleID(playerid); SetVehiclePos(tmpcar, 2364.9453,225.0879,22.5551); TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0; } else { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,2364.9453,225.0879,22.5551); } } if (PlayerToPoint(4, playerid,1353.1167,450.1613,19.9677)) { if (GetPlayerState(playerid) == 2) { new tmpcar = GetPlayerVehicleID(playerid); SetVehiclePos(tmpcar, 1345.7319,435.9819,19.8277); TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0; } else { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,1345.7319,435.9819,19.8277); } } } if(newkeys & KEY_UP) { if (PlayerToPoint(4, playerid,2364.9453,225.0879,22.5551)) { if (GetPlayerState(playerid) == 2) { new tmpcar = GetPlayerVehicleID(playerid); SetVehiclePos(tmpcar, 2355.8599,224.8270,25.8024); TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0; } else { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,2355.8599,224.8270,25.8024); } } if (PlayerToPoint(4, playerid,1345.7319,435.9819,19.8277)) { if (GetPlayerState(playerid) == 2) { new tmpcar = GetPlayerVehicleID(playerid); SetVehiclePos(tmpcar, 1353.1167,450.1613,19.9677); TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0; } else { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,1353.1167,450.1613,19.9677); } } } return 1; }