Re: SampSharp - Write gamemodes in .NET -
ikkentim - 11.10.2015
Use Player.Find(id); instead.
pickups have a pickup.PickedUp event.
Re: SampSharp - Write gamemodes in .NET -
Buero - 11.10.2015
How to create timer or timer for one player?
Re: SampSharp - Write gamemodes in .NET -
ikkentim - 26.10.2015
Quote:
Originally Posted by Buero
How to create timer or timer for one player?
|
To quote from an earlier PM discussion, so that other can enjoy the answer as well,
Quote:
timers are never player specific. not even in pawn.
Simply create a field of type `Timer`in, for example, your gamemode or player class and attach to the `Timer.Tick` event.
|
Re: SampSharp - Write gamemodes in .NET -
Buero - 24.12.2015
How get vehicle model id?
Re: SampSharp - Write gamemodes in .NET -
ikkentim - 24.12.2015
vehicle.Model returns a value of enum VehicleModelType. If you want it as an int, cast it. (int)vehicle.Model
Re: SampSharp - Write gamemodes in .NET -
Buero - 26.12.2015
When I die in car(driver) I spawn but cameta look at car
Re: SampSharp - Write gamemodes in .NET -
ikkentim - 26.12.2015
Thats must be a mistake you made. I'm still calling the same functions as you would be doing in pawn.
You probably moved the camera or something. Search for where you change the camera position. Otherwise, Try resetting the camera player.PutCameraBehindPlayer
http://api.sampsharp.timpotze.nl/htm...ce2399ad3e.htm
http://api.sampsharp.timpotze.nl/sea...rchText=Camera
Edit: if that isn't it, you are probably doing something odd in player died or player update events, judging by the arrow position on the minimap
Re: SampSharp - Write gamemodes in .NET -
Buero - 26.12.2015
When I die I don't see death animation but I see button "<<" ">>" "spawn" so I use Spawn() in Player. OnDeath()
Re: SampSharp - Write gamemodes in .NET -
ikkentim - 26.12.2015
That is the choose-a-class screen. Did you add any classes in your gamemode?
Re: SampSharp - Write gamemodes in .NET -
Buero - 26.12.2015
Quote:
Originally Posted by ikkentim
That is the choose-a-class screen. Did you add any classes in your gamemode?
|
Yes,in BaseMode.OnInitialized -
PHP код:
AddPlayerClass(1, new Vector3(1759.0189f, -1898.1260f, 13.5622f), 266.4503f);
In Player.cs
PHP код:
public override void OnRequestClass(RequestClassEventArgs e)
{
e.PreventSpawning = true;
base.OnRequestClass(e);
}
public override void OnRequestSpawn(RequestSpawnEventArgs e)
{
e.PreventSpawning = true;
base.OnRequestSpawn(e);
}
Re: SampSharp - Write gamemodes in .NET -
ikkentim - 28.12.2015
Well that seems rather logical then, don't you think? You're preventing the player from spawning with that code.
You are basically returning "0" in
https://sampwiki.blast.hk/wiki/OnPlayerRequestSpawn
and in
https://sampwiki.blast.hk/wiki/OnPlayerRequestClass
Re: SampSharp - Write gamemodes in .NET -
SomeDevil - 13.02.2016
Hm. Native doesn't change font at all for me
Re: SampSharp - Write gamemodes in .NET -
ikkentim - 13.02.2016
You have to call textdraw.Show first
Re: SampSharp - Write gamemodes in .NET -
SomeDevil - 13.02.2016
Oh, it works now, thank you
Re: SampSharp - Write gamemodes in .NET -
xyyy018 - 19.02.2016
This plugin support new SA-MP functions? (Actors etc.)
I can run script in C# on Linux?
Re: SampSharp - Write gamemodes in .NET -
ikkentim - 19.02.2016
Yes and yes.
Re: SampSharp - Write gamemodes in .NET -
xyyy018 - 19.02.2016
What is the difference in speed between the PAWN script and the script in C#?
Re: SampSharp - Write gamemodes in .NET -
ikkentim - 19.02.2016
It's been a while since I tested it, all I can remember is that c# is at least more than double the speed.
Re: SampSharp - Write gamemodes in .NET -
xyyy018 - 19.02.2016
Any tutorial how to compile this plugin for Linux?
You can add FCNPC to this? I can use EntityFramework? (Migrations, Codefirst etc.)
Thanks for answers!
Re: SampSharp - Write gamemodes in .NET -
SourceCode - 19.02.2016
Wow it's great fascinating.
__________________
For Bluedart tracking,
visit here.