Report post

Are you sure you want to report the post shown below? This will send an email to the ATVO administrators. Please include a short reason for reporting.

Users reporting for no reason may be locked out.


Post

Posted by Mertcan S
on
Hi everybody,

I try to make showing pit and some infos on stading panel


I created standing and want to add infos. I put pit image to the standing panel and I added scripts which you can find under the message. How can I connect between code and image ? I want to show when driver pits in P image will appear. I don't know that code is correct. I just found on iRacing Forum and I also don't have any code knowledge :/

using System; 
using ATVO.ThemesSDK;
using ATVO.ThemesSDK.Data.Results;
using ATVO.ThemeEditor.ThemeModels;

namespace Scripts
{
public class Script
{

public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
IEntitySessionResult result = (IEntitySessionResult) value;

if (result.DidNotStart == true)
return "DNS";

if (result.Out == true)
return "DNF";

if (result.Entity.Car.Movement.IsInPits == true)
return "PIT";

if (result.Finished == true)
return "FIN";

else
    return "";
   
}
}
}


I hope I can find a solution for it :)

Kindly Regards,
Mertcan