I want manuaL entrance...
#1

Hail Guys,

Im moding RP-mode, and I have a dream

Character touch the pickup, automatical teleport interior.

But, I want manual: so like /enter

How I do ?
Reply
#2

Just check if a player is near the pickup while they use the /enter command. E.g.
Requires PlayerToPoint function
pawn Код:
if(strcmp(cmdtext, "/enter", true) == 0)
{
  if(PlayerToPoint(5, playerid, xx.xx, xx.xx, xx.xx)) // Replace "xx.xx" with the coordinates for the pickup
  {
   SetPlayerInterior(playerid, x); // Replace "x" with teh interior ID.
   SetPlayerPos(playerid, xx.xx, xx.xx, xx.xx); // Place "xx.xx" with the coordinates for the tele'd location
   SetPlayerFacingAngle(playerid, xx.xx); // Place "xx.xx" with the facing angle for when they are tele'd
   return 1;
  }
  return 1;
}
Reply
#3

How I well remove auto entrance (touch the pickup, instantly teleport interiors)
Reply
#4

Don't use PlayerToPoint; Use IsPlayerInRangeOfPoint (;
Reply
#5

Quote:
Originally Posted by MahmutBey
How I well remove auto entrance (touch the pickup, instantly teleport interiors)
Are you talking about already made interiors? (from the origional game?)
Reply
#6

No, Im talking about manuaL entrance,
Reply
#7

He's talking about, Those scirpts where you enter the I icon i auto teleports you, He wants to remove the auto teleport and make it so he has to use /enter. Well i really couldn't help ya i would have to look at the scirpt to see. but look for setplayerpos and stuff like that and try to figure out where it detecs you in the icon and just //comment it out or remove it all together
Reply
#8



Check the players position, if he/she is near a pickup, tell them to use enter. When the command is used, check the position and teleport accordingly.
Reply
#9

Quote:
Originally Posted by Ettans
Gosh, I see some people have trouble reading.
Yes, it seams so people do.

Quote:
Originally Posted by MahmutBey
But, I want manual: so like /enter
Reply
#10

Yeah sorry, got myself there. Edited my post. :P
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)