08.10.2016, 16:34
I'm trying to make some casinos from positions from the real game but the second sets doesn't seem to work
could someone tell me why it isn't working.
Код:
new Casino[4];
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == Casino[0])
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
SetPlayerVirtualWorld(playerid, 1);
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, 2015.8330,1017.7784,996.8750);
SetPlayerFacingAngle(playerid, 90.0000);
SetCameraBehindPlayer(playerid);
return 1;
}
}
if(checkpointid == Casino[1])
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
if(GetPlayerVirtualWorld(playerid) == 1)
{
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2024.6432,1007.8961,10.8203);
SetPlayerFacingAngle(playerid, 270.0000);
SetCameraBehindPlayer(playerid);
return 1;
}
}
if(checkpointid == Casino[2])
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
SetPlayerVirtualWorld(playerid, 2);
SetPlayerInterior(playerid, 12);
SetPlayerPos(playerid, 1133.1400,-10.1003,1000.6797);
SetPlayerFacingAngle(playerid, 0.2041);
SetCameraBehindPlayer(playerid);
return 1;
}
}
if(checkpointid == Casino[3])
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
if(GetPlayerVirtualWorld(playerid) == 2)
{
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2017.5106,1103.2477,10.8203);
SetPlayerFacingAngle(playerid, 234.0048);
SetCameraBehindPlayer(playerid);
return 1;
}
}
}
}
return 1;
}


