SA-MP Forums

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

 
 
Thread Tools Display Modes
Old 03/05/2010, 12:07 PM   #1
[LNL]Remulis
Huge Clucker
 
Join Date: Jan 2009
Posts: 262
Reputation: 0
Default Remove PLEASE!

Got IT!
[LNL]Remulis is offline  
Old 03/05/2010, 01:37 PM   #2
[LNL]Remulis
Huge Clucker
 
Join Date: Jan 2009
Posts: 262
Reputation: 0
Default Re: OnPlayerKeyStateChange Problem!

Somenone ? Srry for 2posting!
[LNL]Remulis is offline  
Old 03/05/2010, 02:01 PM   #3
Assyria
Huge Clucker
 
Join Date: Mar 2010
Posts: 209
Reputation: 0
Default Re: OnPlayerKeyStateChange Problem!

Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if(newkeys & KEY_SECONDARY_ATTACK)
  {
   if(IsPlayerInRangeOfPoint(playerid, 7.0, -1106.2183,-299.7328,74.5391))
   {
     SetPlayerPos(playerid,2221.8914,1983.8129,26.2993);
   }
  }
}
And did you notice that your IsPlayerRangeOfPoint is in kinda weird place with very small range?
__________________
I have stopped with SA:MP, just due some lame-ass reason. Also, MTA is WAY better than SA:MP, I can comment it to you! Download: www.mtasa.com
Assyria is offline  
Old 03/05/2010, 02:03 PM   #4
[LNL]Remulis
Huge Clucker
 
Join Date: Jan 2009
Posts: 262
Reputation: 0
Default Re: OnPlayerKeyStateChange Problem!

So what sould it be ?
[LNL]Remulis is offline  
Old 03/05/2010, 02:05 PM   #5
Assyria
Huge Clucker
 
Join Date: Mar 2010
Posts: 209
Reputation: 0
Default Re: OnPlayerKeyStateChange Problem!

You have to be very near position: (-1106.2183,-299.7328,74.5391), so that the enter key warps you...
But maybe that is what you want..?
__________________
I have stopped with SA:MP, just due some lame-ass reason. Also, MTA is WAY better than SA:MP, I can comment it to you! Download: www.mtasa.com
Assyria is offline  
Old 03/05/2010, 02:07 PM   #6
[LNL]Remulis
Huge Clucker
 
Join Date: Jan 2009
Posts: 262
Reputation: 0
Default Re: OnPlayerKeyStateChange Problem!

Oh thanks Going to try
[LNL]Remulis is offline  
Old 03/05/2010, 02:19 PM   #7
[LNL]Remulis
Huge Clucker
 
Join Date: Jan 2009
Posts: 262
Reputation: 0
Default Re: OnPlayerKeyStateChange Problem!

Wont work dont know why can u test it on ur script please ?

Quote:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playerid, 50.0, -1106.2183,-299.7328,74.5391))
{
SetPlayerPos(playerid,2221.8914,1983.8129,26.2993) ;
}
}
}
Put ur own cordinates
[LNL]Remulis is offline  
Old 03/05/2010, 02:32 PM   #8
Assyria
Huge Clucker
 
Join Date: Mar 2010
Posts: 209
Reputation: 0
Default Re: OnPlayerKeyStateChange Problem!

It works, you can see it by doing this:
Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if(newkeys & KEY_SECONDARY_ATTACK)
  {
   if(IsPlayerInRangeOfPoint(playerid, 10000, -1106.2183,-299.7328,74.5391))
   {
     SetPlayerPos(playerid,2221.8914,1983.8129,26.2993);
   }
  }
}
or removing the whole IsPlayerInRangeOfPoint
if(IsPlayerInRangeOfPoint(playerid, Range, X,Y,Z)) so it means that If you are in some position with range, then the thing works what you are trying to do.
For example: if(IsPlayerInRangeOfPoint(playerid, 50, 0,0,3)) Means that if you are in 50(meters) from position 0 0 3, your thing does its thing, else it wont.
__________________
I have stopped with SA:MP, just due some lame-ass reason. Also, MTA is WAY better than SA:MP, I can comment it to you! Download: www.mtasa.com
Assyria is offline  
Old 03/05/2010, 02:40 PM   #9
[LNL]Remulis
Huge Clucker
 
Join Date: Jan 2009
Posts: 262
Reputation: 0
Default Re: OnPlayerKeyStateChange Problem!

Wow it works nime thanks. You can remove this topic!
[LNL]Remulis is offline  
Old 03/05/2010, 02:42 PM   #10
Assyria
Huge Clucker
 
Join Date: Mar 2010
Posts: 209
Reputation: 0
Default Re: OnPlayerKeyStateChange Problem!

If you don't want to use it with some position, use this:
Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if(newkeys & KEY_SECONDARY_ATTACK)
  {
     SetPlayerPos(playerid,2221.8914,1983.8129,26.2993);
   }
  }
__________________
I have stopped with SA:MP, just due some lame-ass reason. Also, MTA is WAY better than SA:MP, I can comment it to you! Download: www.mtasa.com
Assyria 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
please remove. shady91 Help Archive 0 01/02/2010 11:08 PM
help how do i remove that? Mark k Help Archive 2 22/01/2010 10:31 AM
Remove NewYorkRP Help Archive 6 17/01/2010 01:23 PM
How to remove this ? Zeromanster Help Archive 16 07/11/2009 09:55 PM
Remove Danny_Costelo Everything and Nothing 3 28/04/2009 09:09 PM


All times are GMT. The time now is 07:20 AM.


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