Hello, I do not understand too much how it works level C sharp even if I have basic C sharp I am lost
Could you help me?
public class client
{
public client()
{
new System();
}
class System : BaseScript
{
public System()
{
EventHandlers["playerSpawned"] += new Action<dynamic>(spawn =>
{
//SetCanAttackFriendly(GetPlayerPed(-1), true, false)
//ERROR
Player e = Function.Call<Player>(Hash.GET_PLAYER_PED);
Screen.ShowNotification("playerSpawned :" + e.Name);
//Function.Call(Hash.SET_CAN_ATTACK_FRIENDLY, e, true, false);
//NetworkSetFriendlyFireOption(true)
//Function.Call(Hash.NETWORK_SET_FRIENDLY_FIRE_OPTION, true);
});
Tick += tick;
}
public async Task tick()
{
//SetMaxWantedLevel(0)
Function.Call(Hash.SET_MAX_WANTED_LEVEL, 0);
if (Game.IsControlPressed(0, (Control)38))
{
//Screen.ShowNotification("");
SendNUIMESSAGE("looooool");
}
await BaseScript.Delay(0);
}
public static void SendNUIMESSAGE(string dy)
{
//Not Working
Function.Call(Hash.SEND_NUI_MESSAGE, dy);
}
}
}