19.08.2012, 07:21
It will SendMessage after 10 seconds if you are standing on pickup.
If you want server to send Message only once, irrespective of time you stay on pickup, I would suggest to use a streamer.
Create a circular area around pickup,
when player leave area
If you want server to send Message only once, irrespective of time you stay on pickup, I would suggest to use a streamer.
Create a circular area around pickup,
pawn Код:
area1 = CreateDynamicCircle(Float:x, Float:y, Float:size, worldid = -1, interiorid = -1, playerid = -1);
pawn Код:
public OnPlayerLeaveDynamicArea(playerid, areaid)
{
if(areaid == area1) {
SetPVarInt(playerid,"SendMessage",1); }
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == test)
{
switch(GetPVarInt(playerid,"SendMessage")
{
case 1:
{
SendClientMessage(/*Message*/);
SetPVarInt(playerid,"SendMessage",0);
}
}
}
return 1;
}