02.12.2012, 04:37
How to make door with /enter and /exit?
new exit; exit = CreatePickup(model, type, Float:X, Float:Y, Float:Z, Virtualworld); public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == exit) { SetPlayerPos(playerid,x,y,z) SetPlayerInterior(playerid,0) //change 0 to the interior you want } |
new exit; exit = CreatePickup(model, type, Float:X, Float:Y, Float:Z, Virtualworld); public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(enter,5,cmdtext); return 1; } dcmd_enter(playerid,params[]) { if(PlayerToPoint(1.0,playerid, Float:X, Float:Y, Float:Z) //here x,y,z should be to the point of pickup { SetPlayerPos(playerid,x,y,z);//when player types /enter player will be tp to the x,y,z that you will specify SetPlayerInterior(playerid,0);// return 1; } return 1; } |