07.01.2011, 17:12
Hey so I tried to do an entrance for the LSPD so I came up with this code:
The problem is when I press the button on the location nothing happens. It is placed under OnPlayerKeyStateChange. Any ideas for a fix?
pawn Код:
if(newkeys == KEY_WALK)
{
if(!PlayerToPoint(7.0,playerid,1554.9537,-1675.6584,16.1953))
{//LSPD Entrance
GameTextForPlayer(playerid, "~w~Police Department", 5000, 1);
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid,246.7079,66.2239,1003.6406);
PlayerInfo[playerid][pInt] = 6;
}
}