Press Button ----> action
Featured Replies
Сейчас на странице 0
- Нет пользователей, просматривающих эту страницу
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
Используя этот сайт, вы соглашаетесь Условия использования.
Well hello there its me again
And last time I thought I solved the problem but I apperently didn't
So I want something to happen when the user presses a certain button....
Here's the code I made:
public CustomKillstreaks(Entity player) { ModLoaded(); PlayerConnected += new Action(entity => { entity.SetField("killstreak", 0); entity.SetField("deathstreak", 0); entity.SetField("has3killstreak", 0); entity.SetField("has5killstreak", 0); entity.Call("notifyonplayercommand", "give3killstreak", "+smoke"); entity.Call("notifyonplayercommand", "give5killstreak", "+actionslot 1"); }); player.OnNotify("give3killstreak", (entity) => { if ((player.GetField("has3killstreak") == 1)) { //Super Secret Custom KillStreak Code...... } else { player.Call("iprintlnbold", "You don't have a 3 Killstreak yet!"); } }); }So when I run the server with this code I get the following error:
I noticed that when I remove (Entity player) in the line of the constructor it doesnt give me this error. But that also disables me to use the code that I want if you know what I mean
Maybe it's something very obvious...
But how can I fix this?