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

Coinflip


Post New Thread Reply   
 
Thread Tools Display Modes
Author
KennYSwe
Member
Join Date: Nov 2016
Plugin ID:
5450
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Coinflip
    Old 12-19-2016 , 18:10   Coinflip
    Reply With Quote #1

    This is a coinflip plugin!
    You type !coinflip in the chat and the coin will flip and either land on terrorist or counter terrorist.
    It's 50/50% chance.

    I also made one for Eccas Warden plugin, so only the warden can flip the coin.

    Everything is translatable, so you can edit it however you want it.

    Put the .smx file in plugins and .txt file in translations

    Commands: !coinflip

    PHP Code:
    public OnPluginStart()
    {
        
    RegConsoleCmd("sm_coinflip"OnFlip"Flip the coin");
        
    LoadTranslations("warden-coinflip.phrases")
    }

    public 
    Action:OnFlip(clientargs)
    {
        if (
    warden_iswarden(client) == CanUseCommand)
        
          switch(
    GetRandomInt(12)) 
        { 
            case 
    1
            { 
                
    CPrintToChatAll("%t %t""MSG_PREFIX""Terrorist"); 
            } 
            case 
    2
            { 
                
    CPrintToChatAll("%t %t""MSG_PREFIX""Counter Terrorist");
            } 
        } 
        else  
        {
            
    CPrintToChat(client"%t %t""MSG_PREFIX""Only Warden");  
        }    
        return 
    Plugin_Handled;

    This is one of my first plugins, so give criticism.
    Attached Files
    File Type: smx Warden-coinflip.smx (13.7 KB, 250 views)
    File Type: sp Get Plugin or Get Source (Warden-coinflip.sp - 370 views - 1,019 Bytes)
    File Type: txt warden-coinflip.phrases.txt (413 Bytes, 380 views)
    File Type: smx Coinflip.smx (13.1 KB, 439 views)
    File Type: sp Get Plugin or Get Source (Coinflip.sp - 453 views - 789 Bytes)
    File Type: txt Coinflip.phrases.txt (285 Bytes, 439 views)

    Last edited by KennYSwe; 12-19-2016 at 18:11.
    KennYSwe 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 00:47.


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