SA-MP Forums Archive
[TIP] How to know how far the range is - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [TIP] How to know how far the range is (/showthread.php?tid=144987)



[TIP] How to know how far the range is - Torran - 30.04.2010

When you want to create a IsPlayerInRangeOfPoint or something like that,
And you want to see how far the range is so you can get it just right,
Well heres what to do!

Get some coords, Anywhere will do, Aslong as its accessable,
Then in your script, in OnPlayerSpawn,

SetPlayerCheckpoint with the coords you got, For Floatize put the range you want to use,
Ingame the checkpoint will be as big as the range,

So you dont get your range to small or too big!

This was a Quickie!


Re: [TIP] How to know how far the range is - Lorenc_ - 30.04.2010

p cool


Re: [TIP] How to know how far the range is - Onyx09 - 30.04.2010

nice


Re: [TIP] How to know how far the range is - Zimon95 - 30.04.2010

Or you can make a command like /createcp [radius]
pawn Код:
dcmd(createcp,8,cmdtext);

dcmd_createcp(playerid, params[])
{
  if(!strlen(params)) return SendClientMessage(playerid,0xFFFFFFAA,"USE: /createcp [radius]");
  DisablePlayerRaceCheckpoint(playerid);
  new Float:radius,Float:x,Float:y,Float:z;
  radius = floatstr(params);
  GetPlayerPos(playerid,x,y,z);
  SetPlayerRaceCheckpoint(playerid,2,x,y,z,x,y,z,radius);
  SendClientMessage(playerid,0xFFFFFFAA,"CheckPoint Created!");
  return 1;
}



Re: [TIP] How to know how far the range is - Torran - 30.04.2010

Quote:
Originally Posted by Zimon95
Or you can make a command like /createcp [radius]
pawn Код:
dcmd(createcp,8,cmdtext);

dcmd_createcp(playerid, params[])
{
  if(!strlen(params)) return SendClientMessage(playerid,0xFFFFFFAA,"USE: /createcp [radius]");
  DisablePlayerRaceCheckpoint(playerid);
  new Float:radius,Float:x,Float:y,Float:z;
  radius = floatstr(params);
  GetPlayerPos(playerid,x,y,z);
  SetPlayerRaceCheckpoint(playerid,2,x,y,z,x,y,z,radius);
  SendClientMessage(playerid,0xFFFFFFAA,"CheckPoint Created!");
  return 1;
}
Yes but this is just a tip xd