SA-MP Forums Archive
How to send.. - 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: How to send.. (/showthread.php?tid=135293)



How to send.. - Torran - 19.03.2010

Is it possible to send a SendClientMessage upon pickup,
I tried using [u]OnPlayerPickUpPickup[/b] but that spams the message,
How would i do it without spamming


Re: How to send.. - zallomallo - 19.03.2010

Can you change the pickup type to one that disapears when you run over it?


Re: How to send.. - Torran - 19.03.2010

Hmm, that is one way but if there are other ways id prefer to do it that way


Re: How to send.. - zallomallo - 19.03.2010

You could always set a msg variable to 1 whenever they hit the message.


Re: How to send.. - Torran - 19.03.2010

Huh? XD


Re: How to send.. - gotenks918 - 19.03.2010

Yeah was just about to say the same thing.


Re: How to send.. - zallomallo - 19.03.2010

When they walk over the pickup it checks PickupMessage[playerid]. If its 0 it will send the message and change it to 1.


Re: How to send.. - Torran - 19.03.2010

Yeah but if they walk out of the pickup and back in it sends the message again,
Its a house thing for my RP,
When they walk over it, it displays a message, If they walk out and back in, It will send tht message agen


Re: How to send.. - bilakispa - 19.03.2010

pawn Код:
new bool:variable=0;//set to 0 means haven't gone to the pickup

OnPlayerPickUpPickup ()
{
//.... your stuff
  if (!variable)
  {
     SendClientMessage();//your message
     variable=1;
  }
}
If go to the pickup again it will not show message.

P.S. However i do not prefer this way, anyway...


Re: How to send.. - zallomallo - 19.03.2010

That's will not be very efficient to have a variable for each player for each house with a timer for the message to appear again. My advice is to make a textdraw that appears for 4-5 seconds. Then if they exit and go back in it will stay.