Raised This Month: $32 Target: $400
 8% 

[CURE] Need help with plugin for forcewin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
majkumi
Junior Member
Join Date: Jun 2019
Old 06-10-2019 , 12:54   [CURE] Need help with plugin for forcewin
Reply With Quote #1

Hello,

I trying to do plugin to send event
when new round begin (example) and finish mission.
How i can do that in Codename Cure?


Code:
#include <sourcemod>
#include <sdktools>


public OnPluginStart()
{
    HookEvent("round_start",Event_RoundStart, EventHookMode_PostNoCopy);
}

public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
win_game;
}

win_game is event for win this, need do trigger when round_start be.

Thank you for any help.

Last edited by majkumi; 06-10-2019 at 13:11.
majkumi is offline
majkumi
Junior Member
Join Date: Jun 2019
Old 06-10-2019 , 17:12   Re: [CURE] Need help with plugin for forcewin
Reply With Quote #2

???
majkumi is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 06-10-2019 , 17:42   Re: [CURE] Need help with plugin for forcewin
Reply With Quote #3

https://sm.alliedmods.net/new-api/events/CreateEvent
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
majkumi
Junior Member
Join Date: Jun 2019
Old 06-10-2019 , 17:54   Re: [CURE] Need help with plugin for forcewin
Reply With Quote #4

Quote:
Originally Posted by Franc1sco View Post

Code:
#include <sourcemod>
#include <sdktools>


public OnPluginStart()
{
    HookEvent("round_start",Event_RoundStart, EventHookMode_PostNoCopy);
}

public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
Event CreateEvent(const char[] win_game, bool force)
}
Like this is right?
majkumi is offline
majkumi
Junior Member
Join Date: Jun 2019
Old 06-11-2019 , 08:30   Re: [CURE] Need help with plugin for forcewin
Reply With Quote #5

OK i found new method but just need send event "win_game" instead of example say hi


Code:
#include <sourcemod>

public OnPluginStart()
{
    HookEvent("player_spawn", Event_PlayerSpawn);
}

public Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    
    if (1 <= client <= MaxClients)
    {
        ClientCommand(client, "say hi");
	}
}

someone?
majkumi is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 06-11-2019 , 10:39   Re: [CURE] Need help with plugin for forcewin
Reply With Quote #6

https://wiki.alliedmods.net/Codename...vents#game_win
__________________
Grey83 is offline
majkumi
Junior Member
Join Date: Jun 2019
Old 06-11-2019 , 10:59   Re: [CURE] Need help with plugin for forcewin
Reply With Quote #7

Quote:
Originally Posted by Grey83 View Post
Yeah i know but how trigger? How send via console example Event ...
majkumi is offline
farawayf
Senior Member
Join Date: Jan 2019
Old 06-11-2019 , 12:35   Re: [CURE] Need help with plugin for forcewin
Reply With Quote #8

try

btw idk much about that game.

PHP Code:
public Action RoundStart(Event event, const char[] namebool dontBroadcast) {
    
Event gamewin CreateEvent("win_game");
    if(
gamewin != null) {
        
gamewin.Fire(true);
    }

upd. mistake

Last edited by farawayf; 06-11-2019 at 12:40.
farawayf is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 06-11-2019 , 13:26   Re: [CURE] Need help with plugin for forcewin
Reply With Quote #9

https://wiki.alliedmods.net/Events_(...Sending_Events
__________________
Grey83 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode