Author Topic: Untested Function usefull (try this)  (Read 3155 times)

0 Members and 1 Guest are viewing this topic.

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Untested Function usefull (try this)
« on: February 08, 2013, 12:44:48 am »
this is you can insert in any cmd you want it work when you are near to that player you want to /jail/unjail/kick/ban/drown etc
i convert it from sq to pawn

Mirrorize 1
[pawn]    if (GetPlayerDistance(playerid,plr) >= 3) {
    SendClientMessage(playerid, RED, " You Have To Be Near To That Player");
    }[/pawn]

Mirrorize 2
[pawn]else if(GetPlayerDistance(playerid,plr)) SendClientMessage(playerid,COLOR_RED," You Have To Be Near ");[/pawn]

stock
[pawn]stock GetPlayerDistance( playerid, playerid2)
{
   new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
   new Float:tmpdis;
   GetPlayerPos( playerid,x1,y1,z1 );
   GetPlayerPos( playerid2,x2,y2,z2);
   tmpdis = floatsqroot(floatpower(floatabs(floatsub(x2,x1 ) ),2)+floatpower(floatabs(floatsub(y2,y1 ) ),2)+floatpower(floatabs(floatsub(z2,z1 ) ),2) );
   return floatround(tmpdis);
}[/pawn]

This Function Is From VCMP!

GUPS!

It Will Also Usefull When!

If You Used A Jail Command

With tHis You Can make To Work When You Are Near To Him He Will Be Jailed Otherwise he Cant be! Jailed!

So Its A UseFull Feature Discovered By me!
« Last Edit: March 18, 2014, 03:10:46 pm by mrockxkingbutt »
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: Untested Function usefull (try this)
« Reply #1 on: February 08, 2013, 12:58:42 am »
so emm where is a stock?


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: Untested Function usefull (try this)
« Reply #2 on: February 08, 2013, 02:12:15 am »
You didn't give the function GetPlayerDistance, so this won't work. Please fix it or I'll have to remove it.

EDIT: Thank you!
« Last Edit: February 08, 2013, 06:28:28 am by stormeus »
Do not PM me for support.