[CS:GO] Coinflip

Post Reply
User avatar
Andreeas
Hero Member
Hero Member
Posts: 601
Joined: Wed Jan 22, 2020 8:17 pm
Jucator SA:MP ?: Nu
Nick:: Andreeas
Jucator CS ?: Nu

[CS:GO] Coinflip

Post by Andreeas »

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

Code: Select all

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

public Action:OnFlip(client, args)
{
    if (warden_iswarden(client) == CanUseCommand)
    
      switch(GetRandomInt(1, 2)) 
    { 
        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;
} 




Download
Source
SMX File
Post Reply

Return to “General Purpose”