07.11.2013, 12:41
Quote:
Here is one for you,you can add whatever you want or modify it how you like:
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys==KEY_CROUCH)//Player pressed C { if(IsPlayerInRangeOfPoint(playerid, 3, ENTRANCE TO THE BUILDING)) { SetPlayerVirtualWorld(playerid, SET VW); SetPlayerInterior(playerid, SET INTERIOR YOU WANT); SetPlayerPos(playerid, LOCATION OF THAT INTERIOR); } if(IsPlayerInRangeOfPoint(playerid, 3, LOCATION OF THE EXIT,INSIDE THE INTERIOR) && GetPlayerVirtualWorld(playerid)==VW WHICH WAS SET UP && GetPlayerInterior(playerid)==INTERIOR WHICH WAS SET UP) { SetPlayerVirtualWorld(playerid, SET THE DEFAULT VW); SetPlayerInterior(playerid, SET DEFAULT INTERIOR); SetPlayerPos(playerid, ENTRANCE TO THE BUILDING); // He will come to the place where he pressed C } } return 1; } |
