[TIP] How to know how far the range is
#1

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!
Reply
#2

p cool
Reply
#3

nice
Reply
#4

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;
}
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)