24.02.2010, 20:06
I have OnPlayerInteriorChange in my GM but it is not doing what it's supposed too.
This is what i have, The first one "if(oldinteriorid == 3 && newinteriorid == 0)" Is doing what it's supposed to by placing the player at a specific position
but my other one isnt.... " if(oldinteriorid == 4 && newinteriorid == 0)"
Heres my whole code:
This is what i have, The first one "if(oldinteriorid == 3 && newinteriorid == 0)" Is doing what it's supposed to by placing the player at a specific position
but my other one isnt.... " if(oldinteriorid == 4 && newinteriorid == 0)"
Heres my whole code:
Код:
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { if(oldinteriorid == 3 && newinteriorid == 0) { if(GetPlayerVirtualWorld(playerid) == 1) { SetPlayerVirtualWorld(playerid,0); //SetPlayerInterior(playerid,0); SetPlayerPos(playerid,1877.6157,-1740.8281,13.4860); SetPlayerFacingAngle(playerid,187.0764); SetCameraBehindPlayer(playerid); LeftTwoFourSeven[playerid] =1; TimeToMoveTwoFourSeven[playerid] =3; TogglePlayerControllable(playerid, 0); } if(oldinteriorid == 4 && newinteriorid == 0) { if(GetPlayerVirtualWorld(playerid) == 2) { SetPlayerVirtualWorld(playerid,0); //SetPlayerInterior(playerid,0); SetPlayerPos(playerid,1933.4030,-1776.1339,13.3828); SetPlayerFacingAngle(playerid,272.7751); SetCameraBehindPlayer(playerid); LeftTwoFourSeven[playerid] =2; TimeToMoveTwoFourSeven[playerid] =3; TogglePlayerControllable(playerid, 0); } } } return 1; }
Код:
public twofoursevenmoveplayer() { for (new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && IsSpawned[i] == 1 && GetPlayerInterior(i) == 0 && Jailed[i] == 0) { if(TimeToMoveTwoFourSeven[i] >=1 && TimeToMoveTwoFourSeven[i] <=3) { TimeToMoveTwoFourSeven[i] --; } if(TimeToMoveTwoFourSeven[i] == 0) { if(LeftTwoFourSeven[i] == 1) { SetPlayerVirtualWorld(i,0); SetPlayerInterior(i,0); SetPlayerPos(i,1592.2305,2214.1846,10.8203); SetPlayerFacingAngle(i,187.0764); SetCameraBehindPlayer(i); LeftTwoFourSeven[i] =999; TimeToMoveTwoFourSeven[i] =999; TogglePlayerControllable(i, 1); } if(LeftTwoFourSeven[i] == 2) { SetPlayerVirtualWorld(i,0); SetPlayerInterior(i,0); SetPlayerPos(i,2191.6472,2476.4624,10.8203); SetPlayerFacingAngle(i,272.7751); SetCameraBehindPlayer(i); LeftTwoFourSeven[i] =999; TimeToMoveTwoFourSeven[i] =999; TogglePlayerControllable(i, 1); } } }