SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 19/11/2009, 12:19 AM   #1
j1mzz
Big Clucker
 
Join Date: Nov 2009
Posts: 89
Reputation: 0
Default Need help with /enter

I dont know if this is possible but ime editing a gamemode and i dont want the /enter command to enter a building but i want to walk in the building without entering a command.

How can i do this?
j1mzz is offline  
Old 19/11/2009, 12:51 AM   #2
bigcomfycouch
Huge Clucker
 
Join Date: Feb 2009
Location: Illinois
Posts: 305
Reputation: -2
Default Re: Need help with /enter

In OnGameModeInit, you could put this
Code:
AddStaticPickup(1239, 2, x, y, z, 0);
Then, in OnPlayerPickUpPickup(playerid, pickupid) you could put
Code:
if(IsPlayerInRangeOfPoint(playerid, 2.5, x, y, z))
{
  SetPlayerPos(playerid, x2, y2, z2);
  return 1;
}
And then add another pickup for the exit.

Alternatively, you could use
Code:
new pickup;
OnGameModeInit
Code:
pickup = CreatePickup(1239, 2, x, y, z, 0);
And
Code:
OnPlayerPickUpPickup(playerid, pickupid)
{
  if(pickupid == pickup)
  {
    SetPlayerPos(playerid, x2, y2, z2);
    return 1;
  }
  return 1;
}
bigcomfycouch is offline  
Old 19/11/2009, 02:07 AM   #3
j1mzz
Big Clucker
 
Join Date: Nov 2009
Posts: 89
Reputation: 0
Default Re: Need help with /enter

lol, thanks. Now ime gonna figure out how and where ime gonna add this
Ime kinda noob now.. :P
j1mzz is offline  
Old 19/11/2009, 02:14 AM   #4
Enzo_Ferrari_V12
Big Clucker
 
Join Date: Jul 2008
Posts: 66
Reputation: 0
Default Re: Need help with /enter

ahh good you said that. Add me to msn. Greenvomitfly@yahoo.com I've been scripting for a while now and... I've been working on a stunt server for some time now. I will buy a hosted listing for it in 7 days. I need noobs like you to teach, and in return, you help me with the stunt server. You get admin privs as well
Enzo_Ferrari_V12 is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Press "enter" to /enter a building. .:*Starstrike*:. Help Archive 8 02/08/2010 02:24 AM
How to enter to interior with 'Enter' ? povilaslt2 Help Archive 13 30/03/2010 03:13 PM
[WARNING] on house enter ; /enter Frikandel Help Archive 8 24/11/2009 08:43 AM
how to create an /exit and /enter command to enter an costum interior? sandisk125 Help Archive 5 18/08/2009 02:07 PM
I cant enter.... BP13 Help Archive 3 08/07/2009 05:20 PM


All times are GMT. The time now is 10:45 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.