ZeroPointOne
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Posts posted by ZeroPointOne
-
-
Here is my code:
Commands.cs: using System; using System.Collections.Generic; using System.Text; using GTANetworkAPI; namespace Testing { class Commands : Script { [Command("veh", "/veh um Fahrzueg zu spawnen")] public void cmd_veh(Player player, string vehname, int color1, int color2) { uint vehash = NAPI.Util.GetHashKey(vehname); if (vehash <= 0) { player.SendChatMessage("~r~Ungültiger Spawnname"); return; } Vehicle veh = NAPI.Vehicle.CreateVehicle(vehash, player.Position, player.Heading, color1, color2); veh.NumberPlate = "Spawned"; veh.Locked = false; veh.EngineStatus = true; player.SetIntoVehicle(veh, (int)VehicleSeat.Driver); } } }
Events.cs: using System; using System.Collections.Generic; using System.Text; using GTANetworkAPI; namespace Testing { class Events : Script { [ServerEvent(Event.PlayerConnected)] public void OnPlayerConnected(Player player) { player.SendChatMessage("Wilkommen auf dem Server!"); } [ServerEvent(Event.PlayerSpawn)] public void OnPlayerSpawn(Player player) { player.Health = 0; player.GiveWeapon(WeaponHash.Sniperrifle, 100); } } }
there is no console error but it dont work
Console: https://imgur.com/a/qnrll8a
Please help

Events & Commands not working...
in Scripting
Posted
I have the same problem