Raised This Month: $51 Target: $400
 12% 

[CSGO]What command can only let the plugin only run 1 time?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
chancsomy
Junior Member
Join Date: Sep 2013
Old 02-11-2015 , 09:21   [CSGO]What command can only let the plugin only run 1 time?
Reply With Quote #1

i am scripting a knife round plugin.but once i activate this plugin . no matter it is a knife round or normal round. it says knife round start....
PHP Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>

public OnPluginStart()
{
    
RegAdminCmd("sm_knife"knifeADMFLAG_SLAY"knife round");
}

public 
Action:knife(clientargs)
{
    
ServerCommand("exec knife.cfg");
    
PrintToChatAll("[\x05HKG\x01] \x04knife round begins in 10 seconds");
    
HookEvent("round_start"Event_RoundStart);
    
HookEvent("round_end"Event_RoundEnd);
}

public 
Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
    
PrintToChatAll("[\x05HKG\x01] \x04knife round starts!");
    return;
}

public 
Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
{
    if(
GetTeamScore(CS_TEAM_T) == 1){
        
PrintToChatAll("[\x05HKG\x01] \x04T WON");
        return;
    }
    else{
        
PrintToChatAll("[\x05HKG\x01] \x04CT WON");
        return;
    }

btw.sorry for my bad english hope u guys can know what i am saying

Last edited by chancsomy; 02-11-2015 at 09:25.
chancsomy is offline
 



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 01:26.


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