I have made this way and works.
First set the pistol command on the allowedvotes.cfg:
Next put this script running on the server:
while(1)
{
wait 0.02
local.pistol = getcvar "pistol"
if(local.pistol == "1")
{
$player takeall
for(local.i = 1;local.i <= $player.size;local.i++)
{
local.player = $player[local.i]
if(local.player == NULL)
end
if(local.player.dmteam == "allies")
{
local.player give "weapons/colt45.tik"
local.player useweaponclass pistol
}
else
{
local.player give "weapons/p38.tik"
local.player useweaponclass pistol
}
}
setcvar "pistol" "0"
//set the timout you whant to dont allow a player to vote again during the gametype you whant
//setcvar "g_votetimeout "0"
}
}
Call the vote using callvote pistol 1
Note: If a player dont call the vote using 1 the script will not work.