Author Topic: [FUNCTION] ProxDetectorS  (Read 8351 times)

0 Members and 1 Guest are viewing this topic.

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
[FUNCTION] ProxDetectorS
« on: March 18, 2014, 07:18:44 pm »
Code: [Select]
forward ProxDetectorS(Float:radi, playerid, targetid);
public ProxDetectorS(Float:radi, playerid, targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
//radi = 2.0; //Trigger Radius
GetPlayerPos(targetid, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return true;
}
}
return 0;
}

Eg.:

Using a command or a function

Code: [Select]
                        if (ProxDetectorS(8.0, playerid, plr))
       {
                            SendClientMessage(playerid, -1, "The player is near you!");
                       }
else
{
SendClientMessage(playerid, -1, "  The character is far from You!");
return true;
                }

That and an example, will not try to put it this way to be, and this is an example!

Any bug, post it here

Thank's

Offline dynavolt71

  • Crime Boss
  • ****
  • Posts: 371
    • View Profile
    • My Blog
Re: [FUNCTION] ProxDetectorS
« Reply #1 on: March 19, 2014, 12:50:08 pm »
What is prox ?
[PAWNO]Fix Error " Failed to set data for "" " - http://forum.vicecitymultiplayer.com/index.php?topic=5743.0



:'(

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: [FUNCTION] ProxDetectorS
« Reply #2 on: March 19, 2014, 02:32:08 pm »
Prox  = Distance!
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: [FUNCTION] ProxDetectorS
« Reply #3 on: March 19, 2014, 05:08:52 pm »
What do you want it to do, Matt? Could you please describe your code?


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
Re: [FUNCTION] ProxDetectorS
« Reply #4 on: March 19, 2014, 05:41:38 pm »
What do you want it to do, Matt? Could you please describe your code?

him and good for roleplay servers, eg set the distance between the thief and the policeman, depends on who will use, and how  ;)

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: [FUNCTION] ProxDetectorS
« Reply #5 on: March 20, 2014, 11:50:57 pm »
I still dont get it


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: [FUNCTION] ProxDetectorS
« Reply #6 on: March 21, 2014, 04:08:55 pm »
I still dont get it

Go Buy A New Brain First!
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: [FUNCTION] ProxDetectorS
« Reply #7 on: March 21, 2014, 04:20:56 pm »
I still dont get it

Go Buy A New Brain First!

GTFO you 10 years old angry piece of crap. God damnit I have no words to express how fucking much stupid you are


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline NE.Restricted

  • Wiseguy
  • **
  • Posts: 97
    • View Profile
Re: [FUNCTION] ProxDetectorS
« Reply #8 on: March 21, 2014, 05:07:57 pm »
I still dont get it

Go Buy A New Brain First!

GTFO you 10 years old angry piece of crap. God damnit I have no words to express how fucking much stupid you are
Ill make some words for you:
Gothafagokin: Stupidity of the world
Garmingofgathagin: Stupidity of the universe
I am NE.CrystalBlue!!!
Quote
i cant able to understand

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: [FUNCTION] ProxDetectorS
« Reply #9 on: March 21, 2014, 05:50:08 pm »
I still dont get it

Go Buy A New Brain First!

GTFO you 10 years old angry piece of crap. God damnit I have no words to express how fucking much stupid you are

I still dont get it

Go Buy A New Brain First!

GTFO you 10 years old angry piece of crap. God damnit I have no words to express how fucking much stupid you are
Ill make some words for you:
Gothafagokin: Stupidity of the world
Garmingofgathagin: Stupidity of the universe

@Nesk

can't even see the difference between 10 & 13 . how stupid is this crap .
Nasty SHit Of Pig!

NE.Restricted

Get The Fuck Out Of Here Swine!
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: [FUNCTION] ProxDetectorS
« Reply #10 on: March 21, 2014, 06:33:14 pm »
Locked because no one can stay on topic.
Do not PM me for support.