Jump to content

Type "Player" not found


Jumpin

Recommended Posts

Hi, i just wanna try to do a simple gamemode bust allready failed in the first lines..

This is my code:
 

using System;
using GTANetworkAPI;

namespace ClassLibrary1
{
    public class Main : Script
    {
        [ServerEvent(Event.ResourceStart)]
        public void OnResourceStart()
        {
            NAPI.Util.ConsoleOutput("Working.");
        }
        [ServerEvent(Event.PlayerConnected)]
        public void OnPlayerConnected(Player player)
        {
            NAPI.Util.ConsoleOutput($"{player.Name} joined.");
        }

    }
}

 

The error is in line 14: "public void OnPlayerConnected(Player player)"

Edited by Jumpin
Link to comment
Share on other sites

  • Jumpin changed the title to Type "Player" not found
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...