Message when player enter into a bank
#1

how can i set that when a player get into a 24/7 shop (that are my banks), appear a message in the chat with the commands of the bank?

this is the function that i use to check if a player is in one of the banks
Код:
	  if(PlayerToPoint(100, playerid,-26.6916,-55.7149,1003.5469) || PlayerToPoint(100, playerid,-26.6916,-55.7149,1003.5469) || PlayerToPoint(100, playerid,-30.9467,-89.6096,1003.5469))
Reply
#2

https://sampwiki.blast.hk/wiki/SendClientMessage
Reply
#3

Quote:
Originally Posted by dice7
it have nothing to do with what i asked...
Reply
#4

pawn Код:
if(PlayerToPoint(100, playerid,-26.6916,-55.7149,1003.5469) || PlayerToPoint(100, playerid,-26.6916,-55.7149,1003.5469) || PlayerToPoint(100, playerid,-30.9467,-89.6096,1003.5469))
{
   SendClientMessage();
   return 1;
}
Reply
#5

Quote:
Originally Posted by dice7
pawn Код:
if(PlayerToPoint(100, playerid,-26.6916,-55.7149,1003.5469) || PlayerToPoint(100, playerid,-26.6916,-55.7149,1003.5469) || PlayerToPoint(100, playerid,-30.9467,-89.6096,1003.5469))
{
  SendClientMessage();
  return 1;
}
ye where i put this ? unduer what public?
Reply
#6

Use a timer or put under OnPlayerUpdate. I would also suggest using GetPlayerInterior while checking if a player's in a 24/7
Reply
#7

Quote:
Originally Posted by dice7
Use a timer or put under OnPlayerUpdate. I would also suggest using GetPlayerInterior while checking if a player's in a 24/7
can u write it in pwn?
Reply
#8

By the code you are giving it dosent look good,
Wouldnt that message show everytime he is in that position,
And if he stays in that position for a few seconds it would appear alot?
Correct me if im wrong
Reply
#9

pawn Код:
#define COLOR_LIGHTBLUE 0x33CCFFAA

public OnPlayerInteriorChange(playerid,newinteriorid,oldinteriorid)
{
    if(PlayerToPoint(100, playerid,-26.6916,-55.7149,1003.5469) || PlayerToPoint(100, playerid,-26.6916,-55.7149,1003.5469) || PlayerToPoint(100, playerid,-30.9467,-89.6096,1003.5469))
    {
      if((newinteriorid==4) || (newinteriorid==6) || (newinteriorid==16) || (newinteriorid==18) || (newinteriorid==10) || (newinteriorid==17))
      {
        SendClientMessage(playerid,COLOR_LIGHTBLUE, "Holy shit! You're in a 24/7!");
      }
    }
    return 1;
}
Reply
#10

Quote:
Originally Posted by JoeDaDude
By the code you are giving it dosent look good,
Wouldnt that message show everytime he is in that position,
And if he stays in that position for a few seconds it would appear alot?
Correct me if im wrong
dont think so because he do it only on player change interior .-. btw later i try and i will report the result here
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)