123new NoNameUltima
Вобщем спасибо бразы
Вы оказались правы
в итоге сделал так
Собственно откуда идет вызов
int MsgDelay = 5;
int radius = cData.ToInt();
array<Object> nearest_objects = new array<Object>;
array<CargoBase> proxy_cargos = new array<CargoBase>;
Object object;
string className;
if (radius > 0 && radius <= maxCheckRadius)
{
GetGame().GetObjectsAtPosition(AdminPosition, radius, nearest_objects, proxy_cargos);
for ( int chk = 0; chk < nearest_objects.Count(); chk++ )
{
object = nearest_objects.Get(chk);
className = object.GetType();
if (className)
{
string Msg1 = "Obj:" + chk + ":" + className;
}
else
{
Msg1 = "Obj:" + chk + ":" + object.ToString();
}
string Msg2 = "Pos:" + chk + ":" + object.GetPosition().ToString();
//CALL Delayed message function!
Send_Delayed_Message(PlayerAdmin, Msg1, (MsgDelay * chk), 0);
Send_Delayed_Message(PlayerAdmin, Msg2, ((MsgDelay * chk) + 1), 0);
}
}
И
void Send_Delayed_Message(PlayerBase Player, string Message, int time, int Channel)
{
if ((Message != "") && (time >= 0))
{
GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(Send_Chat_Message, (time * 1000), false, Player, Message, Channel);
}
}
void Send_Chat_Message(PlayerBase Player, string Message, int Channel)
{
Param1<string> Msgparam;
if (Message != "")
{
if (Player)
{
Msgparam = new Param1<string>(Message); //For single player!
GetGame().RPCSingleParam(Player, ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam, true, Player.GetIdentity());
}
else
{
GetGame().ChatPlayer(Channel, Message); //For global chat channel
}
}
}
string GetDateTime()
{
string date = GetCurrentDate();
string time = GetCurrentTime();
return date + ", " + time;
}
string GetCurrentDate()
{
int year, month, day;
GetYearMonthDay(year, month, day);
string date = day.ToStringLen(2) + "." + month.ToStringLen(2) + "." + year.ToStringLen(2);
return date;
}
string GetCurrentTime()
{
int hour, minute, second;
GetHourMinuteSecond(hour, minute, second);
string time = hour.ToStringLen(2) + ":" + minute.ToStringLen(2) + ":" + second.ToStringLen(2);
return time;
}