/enter and /exit
#5

Its better to use pickups as checkpoints like
Quote:

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
}

or
Quote:

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;
}

Reply


Messages In This Thread
/enter and /exit - by kruzer - 02.12.2012, 04:37
Re: /enter and /exit - by goviscrap - 02.12.2012, 04:49
Re: /enter and /exit - by kruzer - 02.12.2012, 05:05
Re: /enter and /exit - by goviscrap - 02.12.2012, 05:11
Re: /enter and /exit - by Dark Killer - 02.12.2012, 05:24

Forum Jump:


Users browsing this thread: 3 Guest(s)